diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java
index 3592cdf..6a90a8e 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java
@@ -290,15 +290,14 @@
 
         if (nodeCat.equals("OPELEM")) {
             // Step I: create element
-            LinkedHashMap<String, Object> elem = new LinkedHashMap<String, Object>();
-            elem.put("@type", "korap:span");
+            LinkedHashMap<String, Object> span = makeSpan();
             if (node.getChild(0).toStringTree().equals("EMPTY")) {
 
             } else {
                 int elname = 0;
                 Tree elnameNode = getFirstChildWithCat(node, "ELNAME");
                 if (elnameNode != null) {
-                    elem.put("key", elnameNode.getChild(0).toStringTree().toLowerCase());
+                    span.put("key", elnameNode.getChild(0).toStringTree().toLowerCase());
                     elname = 1;
                 }
                 if (node.getChildCount() > elname) {
@@ -360,12 +359,12 @@
                         }
                         if (getNodeCat(attrNode).equals("NOTEQ")) negate = true;
                     }
-                    elem.put("attr", termGroup);
+                    span.put("attr", termGroup);
                 }
             }
 
             //Step II: decide where to put
-            putIntoSuperObject(elem);
+            putIntoSuperObject(span);
         }
 
         if (nodeCat.equals("OPLABEL")) {
@@ -722,7 +721,7 @@
 //        else
 //            return layer;
         if (layer.equals("ANA"))
-            return ResourceMapper.descriptor2policy(layer);
+            return ResourceMapper.descriptor2policy("ANA");
         else
             return layer;
 
