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 161aa18..2302fe3 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
@@ -466,7 +466,6 @@
 			ParseTree valNode;
 			if (QueryUtils.hasChild(node, "key")) valNode = node.getChild(3);
 			else valNode = node.getChild(2);
-			System.err.println("WOOAH "+valNode.toStringTree(poliqarpParser));
 			String valType = QueryUtils.getNodeCat(valNode);
 			fieldMap.put("@type", "korap:term");
 			if (valType.equals("simple_query")) {
@@ -478,11 +477,9 @@
 			}
 			if (key == null) {
 				fieldMap.put("key", value);
-				System.err.println("WUUUH "+key+value);
 			} else {
 				fieldMap.put("key", key);
 				fieldMap.put("value", value);
-				System.err.println("WAAAH "+key+value);
 			}
 			
 			if (layer.equals("base")) layer="lemma";
@@ -643,7 +640,16 @@
 			stackedObjects++;
 			// Step II: fill object (token values) and put into containing sequence
 			elem.put("@type", "korap:span");
-			String value = node.getChild(1).toStringTree(poliqarpParser);
+			int valChildIdx = node.getChildCount()-2; // closing '>' is last child
+			String value = node.getChild(valChildIdx).toStringTree(poliqarpParser);
+			ParseTree foundryNode = QueryUtils.getFirstChildWithCat(node, "foundry");
+			ParseTree layerNode = QueryUtils.getFirstChildWithCat(node, "layer");
+			if (foundryNode != null) {
+				elem.put("foundry", foundryNode.getChild(0).toStringTree(poliqarpParser));
+			}
+			if (layerNode != null) {
+				elem.put("layer", layerNode.getChild(0).toStringTree(poliqarpParser));
+			}	
 			elem.put("key", value);
 			// add token to sequence only if it is not an only child (in that case, cq_segments has already added the info and is just waiting for the values from "field")
 			if (node.getParent().getChildCount()>1) {
@@ -731,7 +737,6 @@
 				ParseTree spanNode = node.getChild(2);
 				for (int i=0; i<spanNode.getChildCount()-1; i++) {
 					String ref = spanNode.getChild(i).getText();
-					System.err.println("       "+ref);
 					if (ref.equals("|") || ref.equals("&")) {
 						classRefOp = ref.equals("|") ? "intersection" : "union";
 					} else {
@@ -984,7 +989,8 @@
 				"{[base=Mann]}",
 				"shrink(1:[orth=Der]{1:[orth=Mann][orth=geht]})",
 				"[base=Mann/i]",
-				"[cnx/base=pos:n]"
+				"[cnx/base=pos:n]",
+				"<cnx/c=np>"
 		};
 		PoliqarpPlusTree.debug=true;
 		for (String q : queries) {
diff --git a/src/test/java/PoliqarpPlusTreeTest.java b/src/test/java/PoliqarpPlusTreeTest.java
index ad293eb..bb97c45 100644
--- a/src/test/java/PoliqarpPlusTreeTest.java
+++ b/src/test/java/PoliqarpPlusTreeTest.java
@@ -81,6 +81,7 @@
 	
 	@Test
 	public void testElements() throws QueryException {
+		String query;
 		// <s>
 		String elem1 = "{@type=korap:span, key=s}";
 		assertTrue(equalsQueryContent(elem1, "<s>"));
@@ -88,6 +89,20 @@
 		// <vp>
 		String elem2 = "{@type=korap:span, key=vp}";
 		assertTrue(equalsQueryContent(elem2, "<vp>"));
+		
+		// <cnx/c=vp>
+		query = "<c=vp>";
+		String span3 = "{@type=korap:span, layer=c, key=vp}";
+		ppt = new PoliqarpPlusTree(query);
+		map = ppt.getRequestMap().get("query").toString();
+		assertEquals(span3.replaceAll(" ", ""), map.replaceAll(" ", ""));
+		
+		// <cnx/c=vp>
+		query = "<cnx/c=vp>";
+		String span4 = "{@type=korap:span, foundry=cnx, layer=c, key=vp}";
+		ppt = new PoliqarpPlusTree(query);
+		map = ppt.getRequestMap().get("query").toString();
+		assertEquals(span4.replaceAll(" ", ""), map.replaceAll(" ", ""));
 	}
 	
 	@Test
