diff --git a/src/main/java/de/ids_mannheim/korap/index/MultiTermTokenStream.java b/src/main/java/de/ids_mannheim/korap/index/MultiTermTokenStream.java
index 4b363dd..02f0d5e 100644
--- a/src/main/java/de/ids_mannheim/korap/index/MultiTermTokenStream.java
+++ b/src/main/java/de/ids_mannheim/korap/index/MultiTermTokenStream.java
@@ -419,10 +419,6 @@
             
             payload.put(mt.payload.bytes);
 
-            if (payload.position() > 18) {
-                System.err.println(mt.toString() + " has " + payload.toString());
-            };
-
             if (DEBUG)
                 log.trace("Create payload[1] {}", payload.toString());
         };
diff --git a/src/main/java/de/ids_mannheim/korap/response/Match.java b/src/main/java/de/ids_mannheim/korap/response/Match.java
index 9bbef70..2027ab5 100644
--- a/src/main/java/de/ids_mannheim/korap/response/Match.java
+++ b/src/main/java/de/ids_mannheim/korap/response/Match.java
@@ -786,7 +786,7 @@
 
         try {
             // Store character offsets in ByteBuffer
-            ByteBuffer bb = ByteBuffer.allocate(8);
+            ByteBuffer bb = ByteBuffer.allocate(24);
 
             SpanElementQuery cquery = new SpanElementQuery(field, element);
 
@@ -797,7 +797,7 @@
             int newStartChar = -1, newEndChar = -1;
 
             if (DEBUG)
-                log.trace("Extend match to context boundary with {} in {}",
+                log.trace("Extend match to context boundary with {} in docID {}",
                         cquery.toString(), this.localDocID);
 
             while (true) {
@@ -831,18 +831,19 @@
                             for (byte[] b : contextSpans.getPayload()) {
 
                                 // Not an element span
-                                if (b.length != 8)
+                                if (b[0] != (byte) 64)
                                     continue;
 
-                                bb.put(b);
                                 bb.rewind();
+                                bb.put(b);
+                                bb.position(1);
                                 newStartChar = bb.getInt();
                                 newEndChar = bb.getInt();
                                 break;
                             };
                         }
                         catch (Exception e) {
-                            log.warn(e.getMessage());
+                            log.warn("Some problems with ByteBuffer: " + e.getMessage());
                         };
                     };
                 }
@@ -862,11 +863,12 @@
                             for (byte[] b : contextSpans.getPayload()) {
 
                                 // Not an element span
-                                if (b.length != 8)
+                                if (b[0] != (byte) 64)
                                     continue;
 
-                                bb.put(b);
                                 bb.rewind();
+                                bb.put(b);
+                                bb.position(1);
                                 newEndChar = bb.getInt(1);
                                 break;
                             };
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index 850a404..5fed33b 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -1,4 +1,4 @@
-# log4j.rootLogger = ERROR, stdout
+log4j.rootLogger = ERROR, stdout
 
 # Queries:
 # log4j.logger.de.ids_mannheim.korap.query.SpanNextQuery = TRACE, stdout
@@ -28,7 +28,7 @@
 # log4j.logger.de.ids_mannheim.korap.response.Match = TRACE, stdout
 
 # Index:
-log4j.logger.de.ids_mannheim.korap.KrillIndex = TRACE, stdout
+# log4j.logger.de.ids_mannheim.korap.KrillIndex = TRACE, stdout
 # log4j.logger.de.ids_mannheim.korap.index.PositionsToOffset = TRACE, stdout
 # log4j.logger.de.ids_mannheim.korap.index.MultiTermTokenStream = TRACE, stdout
 
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestReferenceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestReferenceIndex.java
index b7125d5..8bc0242 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestReferenceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestReferenceIndex.java
@@ -72,11 +72,14 @@
         // System.out.println(ref.toString());
 
 		kr = ki.search(ref, (short) 10);
+        /*
 		for (Match km : kr.getMatches()) {
+
 			System.out.println(km.getStartPos() + "," + km.getEndPos() + " "
 					+ km.getSnippetBrackets());
 		}
 		System.out.println(kr.getTotalResults());
+        */
         assertEquals(
                 "spanReference(spanDistance(focus(1: focus(#[1,2]spanSegment("
                         + "focus(#1: spanSegment(spanRelation(base:<:child-of), focus(2: spanNext("
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
index 4c4ab60..6f899a8 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
@@ -233,7 +233,6 @@
         assertEquals(9, kr.getMatch(6).getEndPos());
 
         // check target
-
     }
 
 
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestKrill.java b/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
index bdbb580..4c69178 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
@@ -951,7 +951,8 @@
         // Construct index
         KrillIndex ki = new KrillIndex();
         // Indexing test files
-        for (String i : new String[] { "00001", "00002", "00003", "00004",
+        for (String i : new String[] { "00001",
+                                       "00002", "00003", "00004",
                 "00005", "00006", "02439" }) {
             ki.addDoc(
                     getClass().getResourceAsStream("/wiki/" + i + ".json.gz"),
@@ -975,12 +976,15 @@
         assertEquals(kr.getTotalResults(), 3);
         assertEquals(0, kr.getStartIndex());
         assertEquals(25, kr.getItemsPerPage());
+
         assertFalse(kr.getContext().toJsonNode().toString().equals("\"s\""));
 
         json = getString(getClass().getResource(
                 "/queries/bsp-context-sentence.jsonld").getFile());
 
         kr = new Krill(json).apply(ki);
+        assertEquals(kr.getContext().toJsonNode().toString(), "\"s\"");
+
         assertEquals(kr.getMatch(0).getSnippetBrackets(),
                 "steht a für den dezimalen [Wert] 97 sowohl im ASCII-"
                         + " als auch im Unicode-Zeichensatz");
@@ -991,8 +995,6 @@
                 "In einem Zahlensystem mit einer Basis größer "
                         + "als 10 steht A oder a häufig für den dezimalen"
                         + " [Wert] 10, siehe auch Hexadezimalsystem.");
-
-        assertEquals(kr.getContext().toJsonNode().toString(), "\"s\"");
     };
 
 
