diff --git a/pom.xml b/pom.xml
index 4c9819b..4a1e534 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
 
       ** Indexer after packaging (see above)
       $ java -jar target/Krill-Indexer.jar
-             src/main/resources/krill.properties
+             -cfg src/main/resources/krill.properties
              /data/hdd/lucene-new/WPD/
   -->
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/ClassFilteredSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/ClassFilteredSpans.java
index 57d3d81..0b189d0 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/ClassFilteredSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/ClassFilteredSpans.java
@@ -55,8 +55,9 @@
 
     private boolean isClassOperationValid () throws IOException {
         setBitsets();
-        int cardinality = Math
-                .max(bitset1.cardinality(), bitset2.cardinality());
+
+        int cardinality = Math.max(bitset1.cardinality(), bitset2.cardinality());
+
         bitset1.and(bitset2);
         // System.out.println("cardinality:" + cardinality);
         switch (operation) {
@@ -92,10 +93,20 @@
         int start, end;
         // System.out.println("------------------------");
         for (byte[] payload : firstSpans.getPayload()) {
-            if (payload.length == 9) {
-                start = byte2int(payload, 0) + 1;
-                end = byte2int(payload, 4) + 1;
-                if (payload[8] == classNum1) {
+            System.err.println(
+                               "** " +
+                               payload[0] +
+                               "|" +
+                               byte2int(payload, 1) +
+                               "|" +
+                               byte2int(payload, 5) +
+                               "|" +
+                               payload[8] +
+                               " **");
+            if (payload[0] == 0) {
+                start = byte2int(payload, 1) + 1;
+                end = byte2int(payload, 5) + 1;
+                if (payload[9] == classNum1) {
                     // System.out.println("bitset1 " + start + " " +
                     // end);
                     if (bitset1 == null) {
@@ -108,7 +119,7 @@
                     }
                     // System.out.println(bitset1);
                 }
-                else if (payload[8] == classNum2) {
+                else if (payload[9] == classNum2) {
                     // System.out.println("#bitset2 " + start + " " +
                     // end);
                     if (bitset2 == null) {
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/ClassSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/ClassSpans.java
index f168295..bb49e6a 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/ClassSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/ClassSpans.java
@@ -148,6 +148,14 @@
         // Todo: Better allocate using a Factory!
         bb.clear();
         bb.put((byte) 0).putInt(spans.start()).putInt(spans.end()).put(number);
+        System.err.println(
+                           "####################### " + 
+                           spans.start() +
+                           "|" + 
+                           spans.end() +
+                           ":" +
+                           number
+                           );
 
         // Add highlight information as byte array
         classedPayload.add(bb.array());
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
index 1380c91..4a697f4 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
@@ -148,8 +148,9 @@
 
 			// FIX ME
 			// Copy the start and end character offsets
-            b = Arrays.copyOfRange(bb.array(), 1, 9);
-            this.matchPayload = Collections.singletonList(b);
+            // b = Arrays.copyOfRange(bb.array(), 1, 9);
+            // this.matchPayload = Collections.singletonList(b);
+            this.matchPayload = Collections.singletonList(bb.array());
             return;
         }
 
