Fixed check for element spans payload

Change-Id: Ia77e9b75fd6fdfec927837954ecae6c4931843fd
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/FocusSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/FocusSpans.java
index 36102ee..a23240d 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/FocusSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/FocusSpans.java
@@ -231,7 +231,7 @@
             }
 
             // Remove span elements
-            else if (payload[0] == (byte) 64) {
+            else if ((payload[0] & (byte) 64) != 0) {
                 continue;
             };
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/SubSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/SubSpans.java
index ca01080..3b85685 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/SubSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/SubSpans.java
@@ -123,10 +123,9 @@
 
         // Remove element payloads
         for (byte[] payload : firstSpans.getPayload()) {
-            if (payload[0] == (byte) 64) {
+            if ((payload[0] & ((byte) 64)) != 0) {
                 continue;
             };
-            
             matchPayload.add(payload.clone());
         };
 
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestFocusIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestFocusIndex.java
index 2f668e2..297783d 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestFocusIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestFocusIndex.java
@@ -39,6 +39,7 @@
         SpanNextQuery snq = new SpanNextQuery(stq, sfq);
 
         kr = ki.search(snq, (short) 20);
+
         for (Match m : kr.getMatches()) {
             System.out.println(m.getStartPos() + " " + m.getEndPos());
         }