diff --git a/Changes b/Changes
index 61d9b4c..96b0ae5 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,4 @@
-0.58.1 2018-11-12
+0.58.1 2018-11-27
     - [bugfix] Security upgrade of Jackson for CVE-2017-17485 and
       CVE-2018-7489 (diewald)
     - [bugfix] Span expansion with negation (margaretha)
@@ -10,7 +10,7 @@
     - [bugfix] Fixed skipTo in NextSpans, see de.ids_mannheim.korap.index.
       TestRepetitionIndex.testRepetitionSnippetBug3() (margaretha)
     - [bugfix] Fixed the candidate list in NextSpans, see de.ids_mannheim.
-      korap.index.TestNextIndex.testNextExpansion() (margaretha)   
+      korap.index.TestNextIndex.testNextExpansionBug() (margaretha)   
 
 0.58.0 2018-09-03
     - [feature] Implemented referencing cached collection (margaretha)
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/NextSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/NextSpans.java
index fb5b254..fc915c8 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/NextSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/NextSpans.java
@@ -178,7 +178,8 @@
             if (cs.getStart() == firstSpans.end()) {
                 addMatch(cs);
             }
-            else if (cs.getEnd() < firstSpans.end()){
+            else if (cs.getEnd() < firstSpans.end() 
+                    && cs.getStart() <firstSpans.start()){
                 i.remove();
             }
         }
@@ -268,15 +269,16 @@
                           secondSpans.end(),
                           secondSpans.doc());
             };
+            
+            if (hasMoreFirstSpan){
+                setMatchList();
+            }
+            else {
+                hasMoreSpans = false;
+                candidateList.clear();
+            }
         }
         matchPayload.clear();
-        if (hasMoreFirstSpan){
-            setMatchList();
-        }
-        else {
-            hasMoreSpans = false;
-            candidateList.clear();
-        }
         return advance();
     }
 
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java
index 93ee0ab..7a19b66 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java
@@ -4,6 +4,9 @@
 import static org.junit.Assert.assertEquals;
 
 import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.regex.Pattern;
 
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.spans.SpanOrQuery;
@@ -14,21 +17,57 @@
 import org.junit.runners.JUnit4;
 
 import de.ids_mannheim.korap.KrillIndex;
+import de.ids_mannheim.korap.TestSimple;
 import de.ids_mannheim.korap.query.SpanClassQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanExpansionQuery;
 import de.ids_mannheim.korap.query.SpanFocusQuery;
 import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.query.wrap.SpanSequenceQueryWrapper;
+import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.response.Result;
+import de.ids_mannheim.korap.util.QueryException;
 
 @RunWith(JUnit4.class)
 public class TestNextIndex {
 
     // Todo: primary data as a non-indexed field separated.
+    
+//    @Test
+    public void fuzzyTest () throws IOException, QueryException {
+        List<String> chars = Arrays.asList("a", "b", "c", "c","d", "e");
 
+        // c c a
+        SpanTermQuery stq = new SpanTermQuery(new Term("base", "s:c"));
+        SpanTermQuery stq2 = new SpanTermQuery(new Term("base", "s:a"));
+        SpanNextQuery snq = new SpanNextQuery(stq, stq);
+        SpanNextQuery snq2 = new SpanNextQuery(snq, stq2);
+
+        Pattern resultPattern = Pattern.compile("cca");
+        TestSimple.fuzzingTest(chars, resultPattern, snq2,
+                5, 10, 8);
+    }
+    
     @Test
-    public void testNextExpansion () throws IOException {
+    public void testInfiniteSkipTo () throws IOException {
+        KrillIndex ki = new KrillIndex();
+        ki.addDoc(simpleFieldDoc("ddc"));
+        ki.addDoc(simpleFieldDoc("cc"));
+        ki.addDoc(simpleFieldDoc("abedaed"));
+        ki.commit();
+
+        //cca
+        SpanTermQuery stq = new SpanTermQuery(new Term("base", "s:c"));
+        SpanTermQuery stq2 = new SpanTermQuery(new Term("base", "s:a"));
+        SpanNextQuery snq = new SpanNextQuery(stq, stq);
+        SpanNextQuery snq2 = new SpanNextQuery(snq, stq2);
+        
+        Result kr = ki.search(snq2, (short) 10);
+        assertEquals(0, kr.getTotalResults());
+    }
+    
+    @Test
+    public void testNextExpansionBug () throws IOException {
         KrillIndex ki = new KrillIndex();
         ki.addDoc(simpleFieldDoc("ccecc"));
         ki.commit();
@@ -48,7 +87,7 @@
     }
     
     @Test
-    public void testNextExpansion2 () throws IOException {
+    public void testNextExpansionBug2 () throws IOException {
         KrillIndex ki = new KrillIndex();
         ki.addDoc(simpleFieldDoc("cccc"));
         ki.commit();
@@ -65,7 +104,24 @@
         // 1-3 1-4 1-5 2-4 2-5 3-5
         assertEquals(6, kr.getTotalResults());
     }
-
+    
+    @Test
+    public void testNextExpansionBug3 () throws IOException {
+        KrillIndex ki = new KrillIndex();
+        ki.addDoc(simpleFieldDoc("r a d m d d v b", " "));
+        ki.commit();
+        
+        SpanTermQuery stq = new SpanTermQuery(new Term("base", "s:d"));
+        SpanExpansionQuery seq = new SpanExpansionQuery(stq, 0, 4, 0, true);
+        Result kr = ki.search(seq, (short) 20);
+        
+        SpanNextQuery snq = new SpanNextQuery(seq, stq);
+        kr = ki.search(snq, (short) 10);
+        
+        // 2-5, 2-6, 4-6
+        assertEquals(3, kr.getTotalResults());
+    }
+    
     @Test
     public void indexExample1 () throws IOException {
         KrillIndex ki = new KrillIndex();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
index 8a78b62..118dc2c 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
@@ -48,6 +48,7 @@
      * @throws IOException
      * @throws QueryException
      */
+//    @Test
     public void fuzzyTest () throws IOException, QueryException {
         List<String> chars = Arrays.asList("a", "b", "c", "d", "e");
 
@@ -59,7 +60,7 @@
 
         Pattern resultPattern = Pattern.compile("c[a-e]{0,2}a");
         TestSimple.fuzzingTest(chars, resultPattern, snq,
-                6, 20, 8,1);
+                6, 20, 8);
     }
     
     @Test
