diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/Antlr4AbstractSyntaxTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/Antlr4AbstractSyntaxTree.java
index c454f3c..59a248a 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/Antlr4AbstractSyntaxTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/Antlr4AbstractSyntaxTree.java
@@ -93,7 +93,7 @@
      * @return true iff the node is a container only.
      */
     public boolean isContainerOnly(ParseTree node) {
-    	String[] validNodeNamesArray = "cq_segment sq_segment element empty_segments".split(" ");
+    	String[] validNodeNamesArray = "cq_segment sq_segment element empty_segments spanclass".split(" ");
     	List<String> validNodeNames = Arrays.asList(validNodeNamesArray);
     	List<ParseTree> children = getChildren(node);
     	for (ParseTree child : children) {
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 502702a..0682994 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,7 @@
             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 = (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) {
                 if (getNodeCat(node.getChild(1)).equals("cq_segments") && hasChild(node.getChild(1), "alignment")) {
@@ -222,6 +223,7 @@
                     ignoreCq_segment = true;
                 }
             }
+            System.err.println("WAAAAAAH"+objectStack);
             if (!ignoreCq_segment) {
                 LinkedHashMap<String, Object> sequence = new LinkedHashMap<String, Object>();
                 // Step 0:  cq_segments has 'occ' child -> introduce group as super group to the sequence/token/group
@@ -330,6 +332,8 @@
                         }
                     } else if (!objectStack.isEmpty()) {
                         // embed in super sequence
+                    	System.err.println("BBBBUUUHH "+isContainerOnly(node));
+
                         ArrayList<Object> topSequenceOperands;
                         if (!isContainerOnly(node)) {
                             try {
@@ -1002,7 +1006,8 @@
                 "[base=der][]*[base=Mann]",
                 "[base=der] within s",
                 "([orth=der][base=katze])|([orth=eine][base=baum])",
-                "[orth=der][base=katze]|[orth=eine][base=baum]"
+                "[orth=der][base=katze]|[orth=eine][base=baum]",
+                "shrink(1:{[base=der]}{1:[pos=ADJA]})"
         };
 		PoliqarpPlusTree.verbose=true;
         for (String q : queries) {
diff --git a/src/test/java/PoliqarpPlusTreeTest.java b/src/test/java/PoliqarpPlusTreeTest.java
index 4a45d78..23337db 100644
--- a/src/test/java/PoliqarpPlusTreeTest.java
+++ b/src/test/java/PoliqarpPlusTreeTest.java
@@ -821,6 +821,23 @@
 		ppt = new PoliqarpPlusTree("split(2|3:startswith(<s>,{3:[base=der]{1:[mate/p=ADJA]{2:[tt/p=NN]}}})) ");
 		map = ppt.getRequestMap().get("query").toString();
 		assertEquals(shr7.replaceAll(" ", ""), map.replaceAll(" ", ""));
+		
+		
+		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}}" +
+						"]}" +
+					"]}" +
+				"]}";
+			ppt = new PoliqarpPlusTree("shrink(1:{[base=der]}{1:[pos=ADJA]})");
+			map = ppt.getRequestMap().get("query").toString();
+			assertEquals(shr8.replaceAll(" ", ""), map.replaceAll(" ", ""));
+		
 	}
 	
 	
