diff --git a/src/main/java/de/prob2/jupyter/CommandUtils.java b/src/main/java/de/prob2/jupyter/CommandUtils.java
index 1c173bd2e4cfd41c2321867a52d25ed3d61488d7..09d582d9d4c36fe51dfd09826880ab105063e72c 100644
--- a/src/main/java/de/prob2/jupyter/CommandUtils.java
+++ b/src/main/java/de/prob2/jupyter/CommandUtils.java
@@ -406,14 +406,14 @@ public final class CommandUtils {
 			}
 			
 			final CompleteIdentifierCommand cmdExact = new CompleteIdentifierCommand(prefix);
-			cmdExact.setKeywords(CompleteIdentifierCommand.KeywordContext.ALL);
+			cmdExact.addKeywordContext(CompleteIdentifierCommand.KeywordContext.ALL);
 			trace.getStateSpace().execute(cmdExact);
 			// Use LinkedHashSet to remove duplicates while maintaining order.
 			final Set<String> completions = new LinkedHashSet<>(cmdExact.getCompletions());
 			
 			final CompleteIdentifierCommand cmdIgnoreCase = new CompleteIdentifierCommand(prefix);
 			cmdIgnoreCase.setIgnoreCase(true);
-			cmdIgnoreCase.setKeywords(CompleteIdentifierCommand.KeywordContext.ALL);
+			cmdIgnoreCase.addKeywordContext(CompleteIdentifierCommand.KeywordContext.ALL);
 			trace.getStateSpace().execute(cmdIgnoreCase);
 			completions.addAll(cmdIgnoreCase.getCompletions());