diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/CQLTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/CQLTree.java
index f9c0213..b057eeb 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/CQLTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/CQLTree.java
@@ -56,7 +56,7 @@
     @Override
     public void process(String query) throws QueryException {    	
     	 if ((query == null) || query.isEmpty()) 
-             throw new QueryException(400, "SRU diagnostic 27: An empty query is unsupported.");
+             throw new QueryException(301, "SRU diagnostic 27: An empty query is unsupported.");
     	
         CQLNode cqlNode = parseQuerytoCQLNode(query);
         Map<String,Object> queryMap = parseCQLNode(cqlNode);
@@ -103,13 +103,13 @@
     	    	
         if (node instanceof CQLTermNode) {
             return parseTermNode((CQLTermNode) node);
-        } else if (node instanceof CQLAndNode) {
-            return parseAndNode((CQLAndNode) node);
+        /*} else if (node instanceof CQLAndNode) {
+            return parseAndNode((CQLAndNode) node);*/
         } else if (node instanceof CQLOrNode) {
             return parseOrNode((CQLOrNode) node);
         } else {
-            throw new QueryException(400, "SRU diagnostic 48: Only basic search including term-only " +
-                    "and boolean operator queries (AND and OR) are currently supported.");
+            throw new QueryException(105, "SRU diagnostic 48: Only basic search including term-only " +
+                    "and boolean OR operator queries are currently supported.");
         }
     }
 
@@ -117,7 +117,7 @@
         checkTermNode(node);
         final String term = node.getTerm();
         if ((term == null) || term.isEmpty()) {
-            throw new QueryException(400, "SRU diagnostic 27: An empty term is unsupported.");
+            throw new QueryException(301, "SRU diagnostic 27: An empty term is unsupported.");
         } else if (term.contains(" ")) {
             return writeSequence(term);
         } else {
@@ -199,7 +199,7 @@
         List<Modifier> modifiers = node.getModifiers();
         if ((modifiers != null) && !modifiers.isEmpty()) {
             Modifier modifier = modifiers.get(0);
-            throw new QueryException(400, "SRU diagnostic 20: Relation modifier " +
+            throw new QueryException(105, "SRU diagnostic 20: Relation modifier " +
                     modifier.toCQL() + " is not supported.");
         }
     }
@@ -208,7 +208,7 @@
         // only allow "cql.serverChoice" and "words" index
         if (!(INDEX_CQL_SERVERCHOICE.equals(node.getIndex()) ||
                 INDEX_WORDS.equals(node.getIndex()))) {
-            throw new QueryException(400, "SRU diagnostic 16: Index " + node.getIndex() + " is not supported.");
+            throw new QueryException(105, "SRU diagnostic 16: Index " + node.getIndex() + " is not supported.");
         }
         // only allow "=" relation without any modifiers
         CQLRelation relation = node.getRelation();
@@ -216,13 +216,13 @@
         if (!(TERM_RELATION_CQL_1_1.equals(baseRel) ||
                 TERM_RELATION_CQL_1_2.equals(baseRel) ||
                 SUPPORTED_RELATION_EXACT.equals(baseRel))) {
-            throw new QueryException(400, "SRU diagnostic 19: Relation " +
+            throw new QueryException(105, "SRU diagnostic 19: Relation " +
                     relation.getBase() + " is not supported.");
         }
         List<Modifier> modifiers = relation.getModifiers();
         if ((modifiers != null) && !modifiers.isEmpty()) {
             Modifier modifier = modifiers.get(0);
-            throw new QueryException(400, "SRU diagnostic 20: Relation modifier " +
+            throw new QueryException(105, "SRU diagnostic 20: Relation modifier " +
                     modifier.getValue() + " is not supported.");
         }
     }
diff --git a/src/test/java/CQLTest.java b/src/test/java/CQLTest.java
index b372ce0..e410281 100644
--- a/src/test/java/CQLTest.java
+++ b/src/test/java/CQLTest.java
@@ -62,7 +62,7 @@
 		}
 	}
 	
-	@Test
+/*	@Test
 	public void testAndQuery() throws CQLParseException, IOException, QueryException{
 		query="(Sonne) and (scheint)";	
 		String jsonLd = 
@@ -81,9 +81,9 @@
 		serializedQuery = mapper.writeValueAsString(cqlTree.getRequestMap().get("query"));
 		
 		assertEquals(jsonLd.replace(" ", ""), serializedQuery.replace("\"", ""));
-	}
+	}*/
 	
-	@Test
+/*	@Test
 	public void testBooleanQuery() throws CQLParseException, IOException, QueryException{		
 		query="((Sonne) or (Mond)) and (scheint)";		
 		String jsonLd = 
@@ -116,7 +116,7 @@
 		serializedQuery = mapper.writeValueAsString(cqlTree.getRequestMap().get("query"));
 		assertEquals(jsonLd.replace(" ", ""), serializedQuery.replace("\"", ""));
 		
-	}
+	}*/
 	
 	@Test
 	public void testOrQuery() throws CQLParseException, IOException, QueryException{
