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 ececebd..5e079c0 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
@@ -427,17 +427,22 @@
 		if (nodeCat.equals("field")) {
 			LinkedHashMap<String,Object> fieldMap = new LinkedHashMap<String,Object>();
 			// Step I: extract info
-			String fieldName = "";
+			String layer = "";
+			String foundry = null;
+			String value = null;
 			ParseTree fieldNameNode = node.getChild(0);
 			if (fieldNameNode.getChildCount() == 1) {
-				fieldName = fieldNameNode.getChild(0).toStringTree(poliqarpParser);   //e.g. (field_name base) (field_op !=) (re_query "bar*")
+				layer = fieldNameNode.getChild(0).toStringTree(poliqarpParser);   //e.g. (field_name base) (field_op !=) (re_query "bar*")
 			} else if (fieldNameNode.getChildCount() == 3) {
 				// layer is indicated, merge layer and field name (0th and 2nd children, 1st is "/")
-				String layer = fieldNameNode.getChild(0).toStringTree(poliqarpParser);
-				if (layer.equals("base")) layer="lemma";
-				String layeredFieldName = fieldNameNode.getChild(2).toStringTree(poliqarpParser);
-				fieldName = layer+"/"+layeredFieldName;
-			}
+				foundry = fieldNameNode.getChild(0).toStringTree(poliqarpParser);
+				layer = fieldNameNode.getChild(2).toStringTree(poliqarpParser);
+			} else if (fieldNameNode.getChildCount() == 5) {
+				// layer and value are indicated
+				foundry = fieldNameNode.getChild(0).toStringTree(poliqarpParser);
+				layer = fieldNameNode.getChild(2).toStringTree(poliqarpParser);
+				value = fieldNameNode.getChild(4).toStringTree(poliqarpParser);
+			}	
 			
 			String relation = node.getChild(1).getChild(0).toStringTree(poliqarpParser);
 			if (negField) {
@@ -453,26 +458,22 @@
 				relation="ne";
 			}
 			
-			String value = "";
+			String key = "";
 			ParseTree valNode = node.getChild(2);
 			String valType = QueryUtils.getNodeCat(valNode);
 			fieldMap.put("@type", "korap:term");
 			if (valType.equals("simple_query")) {
-				value = valNode.getChild(0).getChild(0).toStringTree(poliqarpParser);   //e.g. (simple_query (sq_segment foo))
+				key = valNode.getChild(0).getChild(0).toStringTree(poliqarpParser);   //e.g. (simple_query (sq_segment foo))
 			} else if (valType.equals("re_query")) {
-				value = valNode.getChild(0).toStringTree(poliqarpParser); 				//e.g. (re_query "bar*")
+				key = valNode.getChild(0).toStringTree(poliqarpParser); 				//e.g. (re_query "bar*")
 				fieldMap.put("type", "type:regex");
-				value = value.substring(1,value.length()-1); //remove trailing quotes
+				key = key.substring(1,key.length()-1); //remove trailing quotes
 			}
-			fieldMap.put("key", value);
-			if (fieldName.contains("/")) {
-				String[] splitted = fieldName.split("/");
-				fieldMap.put("layer", splitted[1]);
-				fieldMap.put("foundry", splitted[0]);
-			} else {
-				if (fieldName.equals("base")) fieldName = "lemma";
-				fieldMap.put("layer", fieldName);
-			}
+			fieldMap.put("key", key);
+			fieldMap.put("layer", layer);
+			if (foundry != null) fieldMap.put("foundry", foundry);
+			if (value != null) fieldMap.put("value", value);
+			
 			fieldMap.put("match", "match:"+relation);
 			// 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()) {
@@ -960,7 +961,8 @@
 //				"[base=foo] meta year=2000",
 				"{[base=Mann]}",
 				"shrink(1:[orth=Der]{1:[orth=Mann][orth=geht]})",
-				"[base=Mann/i]"
+				"[base=Mann/i]",
+				"[cnx/base/pos=n]"
 		};
 		PoliqarpPlusTree.debug=true;
 		for (String q : queries) {
