diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java
index 63c665e..0cfb938 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java
@@ -417,13 +417,32 @@
             this.inSameDoc = false;
             return false;
         };
-        */
+*/
 
         this.more = true;
         this.inSameDoc = true;
 
         this.wrapDoc = this.wrapSpans.doc();
-        this.embeddedDoc = this.embeddedSpans.doc();
+
+        // Last doc was reached
+        if (this.wrapDoc == DocIdSetIterator.NO_MORE_DOCS) {
+            this.more = false;
+            this.matchDoc = DocIdSetIterator.NO_MORE_DOCS;
+            this.inSameDoc = false;
+            return false;
+        };
+
+        // This is just a workaround for an issue that seems to be a bug in Lucene's core code.
+        try {
+            this.embeddedDoc = this.embeddedSpans.doc();
+        }
+        catch (NullPointerException e) {
+            this.more = false;
+            this.matchDoc = DocIdSetIterator.NO_MORE_DOCS;
+            this.inSameDoc = false;
+            return false;
+        };
+        
 
         // Clear all spanStores
         if (this.wrapDoc != this.embeddedDoc) {
@@ -436,13 +455,6 @@
             */
         }
 
-        // Last doc was reached
-        else if (this.wrapDoc == DocIdSetIterator.NO_MORE_DOCS) {
-            this.more = false;
-            this.matchDoc = DocIdSetIterator.NO_MORE_DOCS;
-            this.inSameDoc = false;
-            return false;
-        }
         else {
             if (DEBUG) {
                 log.trace("Current position already is in the same doc");
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index 78bf62e..fd0328d 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
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
index 103090c..b47d9fa 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
@@ -1113,7 +1113,7 @@
           at de.ids_mannheim.korap.KrillIndex.search(KrillIndex.java:1293)
           at de.ids_mannheim.korap.Krill.apply(Krill.java:304)
         */
-        // startsWith(<base/s=s>, { lassen | laufen })
+
         String jsonPath = getClass().getResource("/queries/bugs/span_or_bug.jsonld")
             .getFile();
         String jsonPQuery = readFile(jsonPath);
@@ -1121,18 +1121,18 @@
 
         SpanWithinQuery sq = (SpanWithinQuery) sqwi.toQuery();
 
+        assertEquals("spanStartsWith(<tokens:base/s:s />, " +
+                     "spanOr([tokens:s:Er, tokens:s:Sie]))", sq.toString());
+
         KrillIndex ki = new KrillIndex();
 
-        ki.addDoc(getClass().getResourceAsStream("/wiki/PPP-02924.json.gz"),
-                  true);
         ki.addDoc(getClass().getResourceAsStream("/wiki/DDD-08370.json.gz"),
                   true);
         ki.addDoc(getClass().getResourceAsStream("/wiki/SSS-09803.json.gz"),
                   true);
         ki.commit();
-        Result kr = ki.search(sq, (short) 10);
-        assertEquals(2, kr.getTotalResults());
-
+        Result kr = ki.search(sq, (short) 1);
+        assertEquals(1, kr.getTotalResults());
     }
 
 
