diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusTree.java
index 0d20174..51ec0f0 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusTree.java
@@ -213,6 +213,8 @@
             cqHasOccChild = false;
             // disregard empty segments in simple queries (parsed by ANTLR as empty cq_segments)
             ignoreCq_segment = (node.getChildCount() == 1 && (node.getChild(0).toStringTree(parser).equals(" ") || getNodeCat(node.getChild(0)).equals("spanclass") || getNodeCat(node.getChild(0)).equals("position")));
+//            ignoreCq_segment = ignoreCq_segment | (node.getParent().getChildCount()==2 && getNodeCat(node.getParent().getChild(1)).equals("flag"));
+            
 //            ignoreCq_segment = (node.getChildCount() == 1 && (node.getChild(0).toStringTree(parser).equals(" ") || getNodeCat(node.getChild(0)).equals("position")));
             // ignore this node if it only serves as an aligned sequence container
             if (node.getChildCount() > 1) {
@@ -490,6 +492,16 @@
             if (foundry != null) fieldMap.put("foundry", foundry);
 
             fieldMap.put("match", "match:" + relation);
+
+        	
+            if (hasChild(valNode.getChild(0), "flag")) {
+            	ParseTree flagNode = getFirstChildWithCat(valNode.getChild(0), "flag").getChild(0);
+            	String flag = getNodeCat(flagNode).substring(1); //substring removes leading slash '/'
+                // add to current token's value
+                if (flag.contains("i")) fieldMap.put("caseInsensitive", true);
+                else if (flag.contains("I")) fieldMap.put("caseInsensitive", false);
+                else fieldMap.put("flag", flag);
+            }
             // Step II: decide where to put the field map (as the only value of a token or the meta filter or as a part of a group in case of coordinated fields)
             if (fieldStack.isEmpty()) {
                 if (!inMeta) {
@@ -1004,7 +1016,11 @@
                 "[base=der] within s",
                 "([orth=der][base=katze])|([orth=eine][base=baum])",
                 "[orth=der][base=katze]|[orth=eine][base=baum]",
-                "shrink(1:{[base=der]}{1:[pos=ADJA]})"
+                "shrink(1:{[base=der]}{1:[pos=ADJA]})",
+                "[mate/m : tense=pres]",
+                "[cnx/base=pos:n]",
+                "deutscher/i",
+                "[orth=deutscher/i]"
         };
 		PoliqarpPlusTree.verbose=true;
         for (String q : queries) {
diff --git a/src/test/java/PoliqarpPlusTreeTest.java b/src/test/java/PoliqarpPlusTreeTest.java
index 23337db..9da4cfc 100644
--- a/src/test/java/PoliqarpPlusTreeTest.java
+++ b/src/test/java/PoliqarpPlusTreeTest.java
@@ -71,6 +71,23 @@
 		ppt = new PoliqarpPlusTree(query);
 		map = ppt.getRequestMap().get("query").toString();
 		assertEquals(cs2.replaceAll(" ", ""), map.replaceAll(" ", ""));
+		
+		query="deutscher/i";
+		String cs3 = 
+				"{@type=korap:token, wrap={@type=korap:term, key=deutscher, layer=orth, match=match:eq, caseInsensitive=true}}";
+		ppt = new PoliqarpPlusTree(query);
+		map = ppt.getRequestMap().get("query").toString();
+		assertEquals(cs3.replaceAll(" ", ""), map.replaceAll(" ", ""));
+		
+		query="deutscher/i Bundestag";
+		String cs4 = 
+				"{@type=korap:group, operation=operation:sequence, operands=[" +
+						"{@type=korap:token, wrap={@type=korap:term, key=deutscher, layer=orth, match=match:eq, caseInsensitive=true}}," +
+						"{@type=korap:token, wrap={@type=korap:term, key=Bundestag, layer=orth, match=match:eq}}" +
+					"]}";
+		ppt = new PoliqarpPlusTree(query);
+		map = ppt.getRequestMap().get("query").toString();
+		assertEquals(cs4.replaceAll(" ", ""), map.replaceAll(" ", ""));
 	}
 	
 	@Test
@@ -824,19 +841,19 @@
 		
 		
 		String shr8 = 
-				"{@type=korap:group, operation=operation:submatch, classRef=[1], operands=[" +
-					"{@type=korap:group, operation=operation:sequence, operands=[" +
-						"{@type=korap:group, operation=operation:class, class=0, operands=[" +
-							"{@type=korap:token, wrap={@type=korap:term, key=der, layer=lemma, match=match:eq}}" +
-						"]}," +
-						"{@type=korap:group, operation=operation:class, class=1, operands=[" +
-							"{@type=korap:token, wrap={@type=korap:term, key=ADJA, layer=pos, match=match:eq}}" +
-						"]}" +
+			"{@type=korap:group, operation=operation:submatch, classRef=[1], operands=[" +
+				"{@type=korap:group, operation=operation:sequence, operands=[" +
+					"{@type=korap:group, operation=operation:class, class=0, operands=[" +
+						"{@type=korap:token, wrap={@type=korap:term, key=der, layer=lemma, match=match:eq}}" +
+					"]}," +
+					"{@type=korap:group, operation=operation:class, class=1, operands=[" +
+						"{@type=korap:token, wrap={@type=korap:term, key=ADJA, layer=pos, match=match:eq}}" +
 					"]}" +
-				"]}";
-			ppt = new PoliqarpPlusTree("shrink(1:{[base=der]}{1:[pos=ADJA]})");
-			map = ppt.getRequestMap().get("query").toString();
-			assertEquals(shr8.replaceAll(" ", ""), map.replaceAll(" ", ""));
+				"]}" +
+			"]}";
+		ppt = new PoliqarpPlusTree("shrink(1:{[base=der]}{1:[pos=ADJA]})");
+		map = ppt.getRequestMap().get("query").toString();
+		assertEquals(shr8.replaceAll(" ", ""), map.replaceAll(" ", ""));
 		
 	}
 	
