diff --git a/src/main/java/de/ids_mannheim/korap/KorapCollection.java b/src/main/java/de/ids_mannheim/korap/KorapCollection.java
index 422a97a..446c085 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapCollection.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapCollection.java
@@ -81,7 +81,7 @@
     // Todo: Create new KorapSearch Object!
 
     public KorapResult search (SpanQuery query) {
-	return this.index.search(this, query, 17, (short) 20, true, (short) 5, true, (short) 5);
+	return this.index.search(this, query, 0, (short) 20, true, (short) 5, true, (short) 5);
     };
 
     public FixedBitSet bits (AtomicReaderContext atomic) throws IOException  {
diff --git a/src/main/java/de/ids_mannheim/korap/KorapMatch.java b/src/main/java/de/ids_mannheim/korap/KorapMatch.java
index 8d56f83..f1b57cb 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapMatch.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapMatch.java
@@ -546,24 +546,53 @@
 
         LinkedList<int[]> spans = new LinkedList<int[]>();
 
-	spans.add(new int[]{ startPosChar - startOffsetChar, endPosChar - startOffsetChar, -1, 0});
+	// Todo: Simplify
+	int[] intArray = new int[]{ startPosChar - startOffsetChar, endPosChar - startOffsetChar, -1, 0};
+	log.trace("IntArray: {}", intArray);
+	spans.add(intArray);
 
 	// highlights
+	// I'm not sure about this.
 	if (this.highlight != null) {
 	    for (int[] highlight : this.highlight) {
 
+		/*
+
+		int start = pto.start(ldid, highlight[0]);
+		int end = pto.end(ldid, highlight[1]);
+
+		// Todo: Does this have to be and or or?
+		if (start == -1 || end == -1)
+		    continue;
+
+		if (start > startOffsetChar) {
+		    start -= startOffsetChar;
+		}
+		else {
+		    start = 0;
+		};
+
+		end -= startOffsetChar;
+		*/
+
 		int start = pto.start(ldid, highlight[0]) - startOffsetChar;
 		int end = pto.end(ldid, highlight[1]) - startOffsetChar;
 
-		if (start == -1 & end == -1)
+		if (start < 0 || end < 0)
 		    continue;
 
-		spans.add(new int[]{
-			start,
-			end,
-			highlight[2],
-			0 // Dummy value for later
-		    });
+		intArray = new int[]{
+		    start,
+		    end,
+		    highlight[2],
+		    0 // Dummy value for later
+		};
+
+		log.trace("IntArray: {}", intArray);
+		log.trace("PTO-start: {}", pto.start(ldid, highlight[0]));
+		log.trace("PTO-end: {}", pto.end(ldid, highlight[1]));
+
+		spans.add(intArray);
 	    };
 	};
 
diff --git a/src/main/java/de/ids_mannheim/korap/index/PositionsToOffset.java b/src/main/java/de/ids_mannheim/korap/index/PositionsToOffset.java
index 62eb516..5e57185 100644
--- a/src/main/java/de/ids_mannheim/korap/index/PositionsToOffset.java
+++ b/src/main/java/de/ids_mannheim/korap/index/PositionsToOffset.java
@@ -116,6 +116,7 @@
 	Integer[] pair = this.offsets.get(ptoa);
 	if (pair == null)
 	    return -1;
+
 	return  pair[1];
     };
 
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index bf8fd29..a4c83b7 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -1,6 +1,6 @@
 ## logger file can be used with
 
-log4j.rootLogger = DEBUG, stdout
+# log4j.rootLogger = DEBUG, stdout
 
 #log4j.logger.de.ids_mannheim.korap.query.spans.ElementSpans = TRACE, stdout
 #log4j.logger.de.ids_mannheim.korap.query.spans.WithinSpans = TRACE, stdout
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
index 3a3e126..f2fe7aa 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
@@ -254,4 +254,39 @@
 	assertEquals("SnippetBrackets (6)", "... [c]", kr.match(6).snippetBrackets());
 	assertEquals("SnippetBrackets (6)", "<span class=\"korap-context-left\"><span class=\"korap-more\"></span></span><span class=\"korap-match\">c</span>", kr.match(6).snippetHTML());
     };
+
+
+    @Test
+    public void indexExample3 () throws IOException {
+	KorapIndex ki = new KorapIndex();
+
+	// abcabcabac
+	FieldDocument fd = new FieldDocument();
+	fd.addTV("base",
+		 "abcabcabac",
+		 "[(0-1)s:a|i:a|_0#0-1|-:t$<i>10]" +
+		 "[(1-2)s:b|i:b|_1#1-2]" +
+		 "[(2-3)s:c|i:c|_2#2-3]" +
+		 "[(3-4)s:a|i:a|_3#3-4]" +
+		 "[(4-5)s:b|i:b|_4#4-5]" +
+		 "[(5-6)s:c|i:c|_5#5-6]" +
+		 "[(6-7)s:a|i:a|_6#6-7]" +
+		 "[(7-8)s:b|i:b|_7#7-8]" +
+		 "[(8-9)s:a|i:a|_8#8-9]" +
+		 "[(9-10)s:c|i:c|_9#9-10]");
+	ki.addDoc(fd);
+
+	ki.commit();
+
+	KorapResult kr;
+
+	KorapQuery kq = new KorapQuery("base");
+
+	SpanQuery sq = kq._(1,kq.seq(kq.seg("s:b")).append(kq.seg("s:a")).append(kq._(2,kq.seg("s:c")))).toQuery();
+
+	kr = ki.search(sq, 0, (short) 20, true, (short) 2, true, (short) 5);
+
+	assertEquals("totalResults", 1, kr.totalResults());
+	assertEquals("SnippetBrackets (0)", "... ca[{1:ba{2:c}}]", kr.match(0).snippetBrackets());
+    };
 };
diff --git a/src/test/resources/wiki/AUG-55286.json.gz b/src/test/resources/wiki/AUG-55286.json.gz
new file mode 100644
index 0000000..a93f558
--- /dev/null
+++ b/src/test/resources/wiki/AUG-55286.json.gz
Binary files differ
