diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
index 2a263a6..a1edeef 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
@@ -719,21 +719,29 @@
         // Create the initial query
         SpanQuery query = null;
         int i = 0;
+
+		// Get the first valid segment
         while (query == null && i < this.segments.size()) {
             query = this.segments.get(i).retrieveNode(this.retrieveNode)
-                    .toFragmentQuery();
+				.toFragmentQuery();
             i++;
         };
 
+		// No valid segment found
         if (query == null)
             return (SpanQuery) null;
-
+	
         // NextQueries
         if (!this.hasConstraints() && this.isInOrder()) {
+
+			// TODO: Optimize:
+			// Join identicals to repetition, so spanNext(a,a) -> a{2}
+			
             for (; i < this.segments.size(); i++) {
 
+				// Get the first query for next sequence
                 SpanQuery second = this.segments.get(i)
-                        .retrieveNode(this.retrieveNode).toFragmentQuery();
+					.retrieveNode(this.retrieveNode).toFragmentQuery();
                 if (second == null)
                     continue;
 
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQuery.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQuery.java
index 912642a..b55b360 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQuery.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQuery.java
@@ -65,7 +65,7 @@
     };
 
 
-    @Ignore
+    @Test
     public void spanSequenceQueryWrapper () throws QueryException {
 
         SpanSequenceQueryWrapper ssqw, ssqw2;
@@ -150,14 +150,13 @@
                         + "(x[2:3], ordered, notExcluded)])",
                 ssqw.toQuery().toString());
 
-
         // Support empty class ins sequence 
         ssqw = new SpanSequenceQueryWrapper("field", "Der");
         srqw = new SpanRepetitionQueryWrapper();
         scqw = new SpanClassQueryWrapper(srqw, (short) 3);
         ssqw.append(scqw);
-        assertEquals("spanExpansion(field:Der, []{1, 1}, right, class:3)",
-                ssqw.toQuery().toString());
+		assertEquals("focus(254: spanContain(<field:base/s:t />, {254: spanExpansion(field:Der, []{1, 1}, right, class:3)}))",
+					 ssqw.toQuery().toString());
 
         // Support empty class ins sequence 
         ssqw = new SpanSequenceQueryWrapper("field");
@@ -170,14 +169,5 @@
         catch (Exception e) {
             fail(e.getMessage() + " (Known issue)");
         };
-        // assertEquals("", scqw.toQuery().toString());
-
-        /*
-        sssq = new SpanSequenceQueryWrapper("field");
-        sssc = new SpanClassQueryWrapper(sssq, (short) 2);
-        SpanSequenceQueryWrapper sssq2 = new SpanSequenceQueryWrapper("field");
-        sssq2.append("hui").append(sssc);
-        assertEquals("", sssq2.toQuery().toString());
-        */
     };
 };
