diff --git a/src/main/antlr/cosmas/c2ps_opPROX.g b/src/main/antlr/cosmas/c2ps_opPROX.g
index f6cdd5a..eda044e 100644
--- a/src/main/antlr/cosmas/c2ps_opPROX.g
+++ b/src/main/antlr/cosmas/c2ps_opPROX.g
@@ -95,24 +95,12 @@
 
 proxDist
 @init{ int countM=0;}
-@rulecatch 
-	{
-	catch (RecognitionException re)
-		{
-		if( re instanceOf  C2RecognitionException )
-			System.err.printf("Debug: catched in proxDist: C2RecognitionException!\n");
-		else
-			System.err.printf("Debug: catched in proxDist: RecognitionException!\n");
-		
-		reportError(re);
-		}
-	}
 	:
 		//((m=proxMeasure {countM++;})|d=proxDirection|v=proxDistValue)+ {countM == 1}? 
 		
-		((m=proxMeasure)|d=proxDirection|v=proxDistValue)+ 
+		((m=proxMeasure {countM++;})|d=proxDirection|v=proxDistValue)+ 
 		      
-	->  {c2ps_opPROX.encodeDIST(DIST, DIR, $d.tree, $m.tree, $v.tree, $proxDist.text)};
+	->  {c2ps_opPROX.encodeDIST(DIST, DIR, $d.tree, $m.tree, $v.tree, $proxDist.text, countM)};
 	
 //	->  {c2ps_opPROX.checkDIST($proxDist.text) == true } ? {c2ps_opPROX.encodeDIST(DIST, DIR, $d.tree, $m.tree, $v.tree, $proxDist.text)};
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/parse/cosmas/c2ps_opPROX.java b/src/main/java/de/ids_mannheim/korap/query/parse/cosmas/c2ps_opPROX.java
index b7c73fa..efa5a41 100644
--- a/src/main/java/de/ids_mannheim/korap/query/parse/cosmas/c2ps_opPROX.java
+++ b/src/main/java/de/ids_mannheim/korap/query/parse/cosmas/c2ps_opPROX.java
@@ -14,38 +14,53 @@
 
 {
 
+	/* duplicateOptions:
+	 * detect if any prox option appears twice or more.
+	 * Return true of false.
+	 * 19.12.23/FB
+	 */
+	
+	private static boolean duplicateOptions(String text)
+	
+	{
+		
+		return false;
+	}
+	
 	/* encodeDIST():
-	 * - returns a CommonTree built of out Direction/Measure/Distance value.
+	 * - returns a CommonTree built from the Direction/Measure/Distance value.
 	 * - accepts options in any order.
 	 * - creates CommonTree in that order: Direction .. Distance value .. Measure.
 	 * - sets default direction to BOTH if not set yet.
 	 * 28.11.23/FB
 	 */
 	
-	public static Object encodeDIST(int typeDIST, int typeDIR, Object ctDir, Object ctMeas, Object ctVal, String text)  
-			throws C2RecognitionException 
+	public static Object encodeDIST(int typeDIST, int typeDIR, Object ctDir, Object ctMeas, Object ctVal, String text, int countM)  
+			//throws C2RecognitionException 
 	{
 		boolean multiple = false;
 		CommonTree tree1 = (CommonTree)ctDir;
 		CommonTree tree2 = (CommonTree)ctMeas;
 		CommonTree tree3 = (CommonTree)ctVal;
 		
-		//addError(StatusCodes.MALFORMED_QUERY,
-        //        "Could not parse query. Please make sure it is well-formed.");
+		System.err.printf("Debug: encodeDIST: scanned input='%s' countM=%d.\n", text, countM);
+
 		
-		System.err.printf("Debug: encodeDIST: scanned input='%s'.\n", text);
-		
-		if( multiple == true )
+		if( duplicateOptions(text) == true )
 			{
-			CommonTree 
-				errorTree = new CommonTree(new CommonToken(typeDIST, "DIST")),
-				errorNode = new CommonTree(new CommonToken(1, "ERROR")),
-				errorPos  = new CommonTree(new CommonToken(1, "15")),
-				errorArg  = new CommonTree(new CommonToken(1, text));
+			CommonTree errorTree, errorNode, errorPos, errorArg, errorMes;
 			
+			errorTree = new CommonTree(new CommonToken(typeDIST, "DIST"));
+			errorNode = new CommonTree(new CommonToken(1, "ERROR"));
+			errorPos  = new CommonTree(new CommonToken(1, "15"));
+			errorArg  = new CommonTree(new CommonToken(1, text));
+			errorMes  = new CommonTree(new CommonToken(1, "Operator PROX/Abstand darf nur höchsten 1 Abstandswert, Abstandstyp und" +
+															  " Abstandsrichtung enthalten!"));
+				
 			errorTree.addChild(errorNode);
 			errorNode.addChild(errorPos);
 			errorNode.addChild(errorArg);
+			errorNode.addChild(errorMes);
 			
 			System.err.printf("Debug: encodeDIST: parse error found, returning error tree: %s.\n", 
 					errorTree.toStringTree());
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessor.java b/src/main/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessor.java
index 4c36a1d..8d42718 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessor.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessor.java
@@ -131,6 +131,56 @@
     public static Pattern wildcardPlusPattern = Pattern.compile("([+])");
     public static Pattern wildcardQuestionPattern = Pattern.compile("([?])");
 
+	/**
+	 * searchforError
+	 * - returns true if an error node is found in the tree referenced by 'node'.
+	 * - adds the corresponding error message to the error list.
+	 * @param node
+	 * @return: true: error node was found,
+	 * 			false; no error node found.
+	 * 19.12.23/FB
+	 */
+    
+    private boolean searchforError(Tree node)
+    
+    {
+    	//System.err.printf("Debug: searchforError: '%s' has %d children.\n",
+    	//		node.toStringTree(), node.getChildCount());
+    	
+    	if( node.getType() == 1 && node.getText().compareTo("ERROR") == 0 )
+	    	{
+	    	// error node found:
+    		//System.err.printf("Debug: searchforError: error node found: %s.\n", node.toStringTree());
+    		String
+    			message = String.format("Fehler %s gefunden bei '%s': %s.",
+    					node.getChild(0) != null ? node.getChild(0).getText() : "",
+    	    			node.getChild(1) != null ? node.getChild(1).getText() : "",
+    	    			node.getChild(2) != null ? node.getChild(2).getText() : "");
+    		
+    		addError(345, message);
+    		return true;
+	    	}
+    	
+    	for(int i=0; i<node.getChildCount(); i++)
+	    	{
+    		Tree
+    			son = node.getChild(i);
+    		
+    		/* System.err.printf(" node: text='%s' type=%d start=%d end=%d.\n",
+    				son.getText(), 
+    				son.getType(),
+    				son.getTokenStartIndex(),
+    				son.getTokenStopIndex());
+    		*/
+
+    		if( searchforError(son) )
+    			return true; // error found, stop here.
+	    	}
+    	
+    	// no error node:
+    	return false;
+    }
+
     /**
      * @param tree
      *            The syntax tree as returned by ANTLR
@@ -165,10 +215,12 @@
     public void process (String query) {
         Tree tree = null;
         tree = parseCosmasQuery(query);
-        if (DEBUG) { 
+        if (DEBUG) 
+        	{ 
         	System.out.printf("\nProcessing COSMAS II query: %s.\n\n", query);
             log.debug("Processing CosmasII query: " + query);
-        }
+        	}
+        
         if (tree != null) 
         	{
             if (verbose) {
@@ -731,10 +783,19 @@
 
     @SuppressWarnings("unchecked")
     private void processOPPROX (Tree node) {
+    	
         // collect info
         Tree prox_opts = node.getChild(0);
         Tree typ = prox_opts.getChild(0);
         Tree dist_list = prox_opts.getChild(1);
+    	
+    	// search for an error and if there is one, add it to the list:
+  	    if( searchforError(prox_opts) )
+			{
+        	return;
+	    	}
+
+        
         // Step I: create group
         Map<String, Object> group =
                 KoralObjectGenerator.makeGroup(KoralOperation.SEQUENCE);
@@ -1762,8 +1823,8 @@
                     new org.antlr.runtime.CommonTokenStream(lex); // v3
             
            System.out.printf("parseCosmasQuery: tokens = %d\n",  tokens.size());
-           System.out.printf("parseCosmasQuery: tokens = %s\n",  tokens.toString());
            System.out.printf("parseCosmasQuery: tokens[] = ");
+           
            for(int i=0; i<tokens.size(); i++)
            		System.out.printf("%s ", tokens.get(i).toString());
            		
