diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/CollectionQueryTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/CollectionQueryTree.java
index 5742b1e..c598ba2 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/CollectionQueryTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/CollectionQueryTree.java
@@ -96,6 +96,7 @@
                 term.putAll(parseValue(valueNodes.get(0)));
                 String match = operatorNodes.get(0).getText();
                 term.put("match", "match:" + interpretMatch(match));
+                checkOperatorValueConformance(term);
                 putIntoSuperObject(term);
             } else { // (valueNodes.size()==2)
                 LinkedHashMap<String, Object> termGroup = makeDocGroup("and");
@@ -107,6 +108,7 @@
                 String match1 = operatorNodes.get(0).getText();
                 term1.put("match", "match:" + invertInequation(interpretMatch(match1)));
                 termGroupOperands.add(term1);
+                checkOperatorValueConformance(term1);
 
                 LinkedHashMap<String, Object> term2 = makeDoc();
                 term2.put("key", field);
@@ -114,6 +116,7 @@
                 String match2 = operatorNodes.get(1).getText();
                 term2.put("match", "match:" + interpretMatch(match2));
                 termGroupOperands.add(term2);
+                checkOperatorValueConformance(term2);
 
                 putIntoSuperObject(termGroup);
             }
@@ -196,17 +199,27 @@
     }
 
 
-    private LinkedHashMap<String, Object> parseValue(ParseTree valueNode) {
+    private void checkOperatorValueConformance(LinkedHashMap<String, Object> term) {
+		String match = (String) term.get("match");
+		String type = (String) term.get("type");
+		if (type == null || type.equals("type:regex")) {
+			if (!(match.equals("match:eq") || match.equals("match:ne"))) {
+				errorMsgs.add("You used an inequation operator with a string value.");
+				System.err.println("You used an inequation operator with a string value.");
+			}
+		}
+	}
+
+	private LinkedHashMap<String, Object> parseValue(ParseTree valueNode) {
     	LinkedHashMap<String, Object> map = new LinkedHashMap<String, Object>();
     	if (getNodeCat(valueNode.getChild(0)).equals("regex")) {
     		String regex = valueNode.getChild(0).getChild(0).toStringTree(parser);
     		map.put("value", regex.substring(1, regex.length()-1));
     		map.put("type", "type:regex");
     	} else if (getNodeCat(valueNode.getChild(0)).equals("date")) {
-    		LinkedHashMap<String,String> valueMap = new LinkedHashMap<String,String>();
-    		valueMap.put("@type", "xsd:date");
-    		valueMap.put("@value", valueNode.getChild(0).getChild(0).toStringTree(parser));
-    		map.put("value", valueMap);
+    		map.put("type", "type:date");
+    		String value = valueNode.getChild(0).getChild(0).toStringTree(parser);
+    		map.put("value", value);
     	} else {
     		map.put("value", valueNode.getChild(0).toStringTree(parser));
     	}
@@ -404,7 +417,7 @@
         query = "(textClass=wissenschaft & textClass=politik) | textClass=ausland";
         query = "1990<year<2010 & genre=Sport";
         query = "1990<year<2010";
-        query = "pubDate<2010-09";
+        query = "pubDate<Sport";
 //        query = "foo=b-ar";
         CollectionQueryTree filter = new CollectionQueryTree();
 //    	filter.verbose = true;
diff --git a/src/test/java/CollectionQueryTreeTest.java b/src/test/java/CollectionQueryTreeTest.java
index f71eabb..cf7c398 100644
--- a/src/test/java/CollectionQueryTreeTest.java
+++ b/src/test/java/CollectionQueryTreeTest.java
@@ -43,7 +43,7 @@
 		expected = 
 				"{@type=korap:docGroup, operation=operation:and, operands=[" +
 					"{@type=korap:doc, key=textClass, value=Sport, match=match:eq}," +
-					"{@type=korap:doc, key=year, value={@type=xsd:date, @value=2014}, match=match:eq}" +
+					"{@type=korap:doc, key=year, type=type:date, value=2014, match=match:eq}" +
 				"]}";
 		cqt = new CollectionQueryTree();
 		cqt.process(query);
@@ -58,7 +58,7 @@
 				"{@type=korap:docGroup, operation=operation:and, operands=[" +
 					"{@type=korap:doc, key=textClass, value=Sport, match=match:eq}," +
 					"{@type=korap:docGroup, operation=operation:and, operands=[" +
-						"{@type=korap:doc, key=year, value={@type=xsd:date, @value=2014}, match=match:eq}," +
+						"{@type=korap:doc, key=year, type=type:date, value=2014, match=match:eq}," +
 						"{@type=korap:doc, key=corpusID, value=WPD, match=match:eq}" +
 					"]}" +
 				"]}";
@@ -75,7 +75,7 @@
 		expected = 
 				"{@type=korap:docGroup, operation=operation:or, operands=[" +
 					"{@type=korap:doc, key=textClass, value=Sport, match=match:eq}," +
-					"{@type=korap:doc, key=year, value={@type=xsd:date, @value=2014}, match=match:eq}" +
+					"{@type=korap:doc, key=year, type=type:date, value=2014, match=match:eq}" +
 				"]}";
 		cqt = new CollectionQueryTree();
 		cqt.process(query);
@@ -90,7 +90,7 @@
 				"{@type=korap:docGroup, operation=operation:or, operands=[" +
 					"{@type=korap:doc, key=textClass, value=Sport, match=match:eq}," +
 					"{@type=korap:docGroup, operation=operation:or, operands=[" +
-						"{@type=korap:doc, key=year, value={@type=xsd:date, @value=2014}, match=match:eq}," +
+						"{@type=korap:doc, key=year, type=type:date, value=2014, match=match:eq}," +
 						"{@type=korap:doc, key=corpusID, value=WPD, match=match:eq}" +
 					"]}" +
 				"]}";
@@ -162,7 +162,7 @@
 						"{@type=korap:doc, key=corpusID, value=WPD, match=match:eq}," +
 						"{@type=korap:docGroup, operation=operation:and, operands=[" +
 							"{@type=korap:doc, key=author, value=White, match=match:eq}," +
-							"{@type=korap:doc, key=year, value={@type=xsd:date, @value=2010}, match=match:eq}" +
+							"{@type=korap:doc, key=year, type=type:date, value=2010, match=match:eq}" +
 						"]}" +
 					"]}" +
 				"]}";
@@ -178,8 +178,8 @@
 		query = "1990<pubDate<2010";
 		expected = 
 				"{@type=korap:docGroup, operation=operation:and, operands=[" +
-					"{@type=korap:doc, key=pubDate, value={@type=xsd:date, @value=1990}, match=match:gt}," +
-					"{@type=korap:doc, key=pubDate, value={@type=xsd:date, @value=2010}, match=match:lt}" +
+					"{@type=korap:doc, key=pubDate, type=type:date, value=1990, match=match:gt}," +
+					"{@type=korap:doc, key=pubDate, type=type:date, value=2010, match=match:lt}" +
 				"]}";
 		cqt = new CollectionQueryTree();
 		cqt.process(query);
@@ -188,7 +188,7 @@
 		
 		query = "pubDate>=1990";
 		expected = 
-				"{@type=korap:doc, key=pubDate, value={@type=xsd:date, @value=1990}, match=match:geq}";
+				"{@type=korap:doc, key=pubDate, type=type:date, value=1990, match=match:geq}";
 		cqt = new CollectionQueryTree();
 		cqt.process(query);
 		map = cqt.getRequestMap().toString();
@@ -196,7 +196,7 @@
 		
 		query = "pubDate>=1990-05";
 		expected = 
-				"{@type=korap:doc, key=pubDate, value={@type=xsd:date, @value=1990-05}, match=match:geq}";
+				"{@type=korap:doc, key=pubDate, type=type:date, value=1990-05, match=match:geq}";
 		cqt = new CollectionQueryTree();
 		cqt.process(query);
 		map = cqt.getRequestMap().toString();
@@ -204,7 +204,7 @@
 		
 		query = "pubDate>=1990-05-01";
 		expected = 
-				"{@type=korap:doc, key=pubDate, value={@type=xsd:date, @value=1990-05-01}, match=match:geq}";
+				"{@type=korap:doc, key=pubDate, type=type:date, value=1990-05-01, match=match:geq}";
 		cqt = new CollectionQueryTree();
 		cqt.process(query);
 		map = cqt.getRequestMap().toString();
