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 0f49ced..332deae 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
@@ -11,7 +11,7 @@
 
 /**
  * @author margaretha
- * @date 	23.04.14
+ * @date 	09.05.14
  */
 public class CQLTree extends AbstractSyntaxTree {
 
@@ -55,7 +55,7 @@
     @Override
     public void process(String query) throws QueryException {    	
     	 if ((query == null) || query.isEmpty()) 
-             throw new QueryException(27, "An empty query is unsupported.");
+             throw new QueryException(400, "SRU diagnostic 27: An empty query is unsupported.");
     	
         CQLNode cqlNode = parseQuerytoCQLNode(query);
         Map<String,Object> queryMap = parseCQLNode(cqlNode);
@@ -87,7 +87,7 @@
         } else if (node instanceof CQLOrNode) {
             return parseOrNode((CQLOrNode) node);
         } else {
-            throw new QueryException(48, "Only basic search including term-only " +
+            throw new QueryException(400, "SRU diagnostic 48: Only basic search including term-only " +
                     "and boolean operator queries (AND and OR) are currently supported.");
         }
     }
@@ -96,7 +96,7 @@
         checkTermNode(node);
         final String term = node.getTerm();
         if ((term == null) || term.isEmpty()) {
-            throw new QueryException(27, "An empty term is unsupported.");
+            throw new QueryException(400, "SRU diagnostic 27: An empty term is unsupported.");
         } else if (term.contains(" ")) {
             return writeSequence(term);
         } else {
@@ -178,7 +178,7 @@
         List<Modifier> modifiers = node.getModifiers();
         if ((modifiers != null) && !modifiers.isEmpty()) {
             Modifier modifier = modifiers.get(0);
-            throw new QueryException(20, "Relation modifier " +
+            throw new QueryException(400, "SRU diagnostic 20: Relation modifier " +
                     modifier.toCQL() + " is not supported.");
         }
     }
@@ -187,7 +187,7 @@
         // only allow "cql.serverChoice" and "words" index
         if (!(INDEX_CQL_SERVERCHOICE.equals(node.getIndex()) ||
                 INDEX_WORDS.equals(node.getIndex()))) {
-            throw new QueryException(16, "Index " + node.getIndex() + " is not supported.");
+            throw new QueryException(400, "SRU diagnostic 16: Index " + node.getIndex() + " is not supported.");
         }
         // only allow "=" relation without any modifiers
         CQLRelation relation = node.getRelation();
@@ -195,13 +195,13 @@
         if (!(TERM_RELATION_CQL_1_1.equals(baseRel) ||
                 TERM_RELATION_CQL_1_2.equals(baseRel) ||
                 SUPPORTED_RELATION_EXACT.equals(baseRel))) {
-            throw new QueryException(19, "Relation " +
+            throw new QueryException(400, "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(20, "Relation modifier " +
+            throw new QueryException(400, "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 2686b03..b372ce0 100644
--- a/src/test/java/CQLTest.java
+++ b/src/test/java/CQLTest.java
@@ -25,35 +25,40 @@
 		try {
 			CQLTree cqlTree = new CQLTree(query, version);
 		} catch (QueryException e) {
-			assertEquals(48,e.getErrorCode());
+			int errorCode = Integer.parseInt(e.getMessage().split(":")[0].replace("SRU diagnostic ", ""));
+			assertEquals(48,errorCode);
 		}
 		
 		query = "(Kuh) or/rel.combine=sum (Germ) ";		
 		try {
 			CQLTree cqlTree = new CQLTree(query, version);
 		}catch (QueryException e) {			
-			assertEquals(20,e.getErrorCode());
+			int errorCode = Integer.parseInt(e.getMessage().split(":")[0].replace("SRU diagnostic ", ""));
+			assertEquals(20,errorCode);
 		}
 		
 		query = "dc.title any Germ ";
 		try {
 			CQLTree cqlTree = new CQLTree(query, version);
 		} catch (QueryException e) {
-			assertEquals(16,e.getErrorCode());
+			int errorCode = Integer.parseInt(e.getMessage().split(":")[0].replace("SRU diagnostic ", ""));
+			assertEquals(16,errorCode);
 		}
 		
 		query = "cql.serverChoice any Germ ";
 		try {
 			CQLTree cqlTree = new CQLTree(query, version);
 		} catch (QueryException e) {
-			assertEquals(19,e.getErrorCode());
+			int errorCode = Integer.parseInt(e.getMessage().split(":")[0].replace("SRU diagnostic ", ""));
+			assertEquals(19,errorCode);
 		}
 		
 		query = "";
 		try {
 			CQLTree cqlTree = new CQLTree(query, version);
 		} catch (QueryException e) {
-			assertEquals(27,e.getErrorCode());
+			int errorCode = Integer.parseInt(e.getMessage().split(":")[0].replace("SRU diagnostic ", ""));
+			assertEquals(27,errorCode);
 		}
 	}
 	
@@ -62,7 +67,7 @@
 		query="(Sonne) and (scheint)";	
 		String jsonLd = 
 			"{@type : korap:group, operation : operation:sequence, distances:[ "+
-				"{@type : korap:distance, key : t, min : 0, max : 0 } ],"+
+				"{@type : korap:distance, key : w, min : 0, max : 0 } ],"+
 					"operands : ["+
 						"{@type : korap:token, wrap : {@type : korap:term,key : Sonne, layer : orth, match : match:eq}}," + 
 						"{@type : korap:token,wrap : {@type : korap:term,key : scheint,layer : orth,match : match:eq}" +
@@ -83,7 +88,7 @@
 		query="((Sonne) or (Mond)) and (scheint)";		
 		String jsonLd = 
 			"{@type:korap:group, operation:operation:sequence, distances:[" +
-				"{@type:korap:distance, key:t, min:0, max:0}" +
+				"{@type:korap:distance, key:w, min:0, max:0}" +
 				"], operands:[" +
 					"{@type:korap:group, operation:operation:or, operands:[" +
 						"{@type:korap:token, wrap:{@type:korap:term, key:Sonne, layer:orth, match:match:eq}}," +
@@ -99,7 +104,7 @@
 		query="(scheint) and ((Sonne) or (Mond))";
 		jsonLd = 
 				"{@type:korap:group, operation:operation:sequence, distances:[" +
-						"{@type:korap:distance, key:t, min:0, max:0}" +
+						"{@type:korap:distance, key:w, min:0, max:0}" +
 					"], operands:[" +
 						"{@type:korap:token, wrap:{@type:korap:term, key:scheint, layer:orth, match:match:eq}}," +
 						"{@type:korap:group, operation:operation:or, operands:[" +
