diff --git a/Changes b/Changes
index 965f5d6..250b625 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,8 @@
+0.55.4 2016-02-25
+        - [bugfix] Wrap <base/s=t> boundaries around right extended queries
+	  (diewald)
+	- [bugfix] Lazy loading bug in WithinSpans (diewald)
+
 0.55.3 2016-02-22
 	- [bugfix] Use base foundry for default sentences and paragraphs
 	  (diewald, margaretha)
diff --git a/pom.xml b/pom.xml
index 26a55eb..47118ed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
 
   <groupId>de.ids_mannheim.korap</groupId>
   <artifactId>Krill</artifactId>
-  <version>0.55.3</version>
+  <version>0.55.4</version>
   <packaging>jar</packaging>
 
   <name>Krill</name>
diff --git a/src/main/java/de/ids_mannheim/korap/Krill.java b/src/main/java/de/ids_mannheim/korap/Krill.java
index 8800604..ad72f7a 100644
--- a/src/main/java/de/ids_mannheim/korap/Krill.java
+++ b/src/main/java/de/ids_mannheim/korap/Krill.java
@@ -181,7 +181,7 @@
                     // Serialize a Lucene SpanQuery based on the SpanQueryWrapper
                     this.spanQuery = qw.toQuery();
 
-                    // TODO: Make these information query rewrites in toFinalQuery()
+                    // TODO: Make these information query rewrites
 
                     // Throw a warning in case the root object is optional
                     if (qw.isOptional())
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 2afcc42..539c331 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
@@ -24,6 +24,8 @@
  *
  * TODO: Support exclusivity
  * TODO: Use the term "queue" and implement it similar to SpanOrQuery
+ * TODO: Implement a incrStartPos() method to forward an embedded span
+ *       until the start position is higher than the current start position.
  */
 
 /**
@@ -282,13 +284,14 @@
                     this.more = true;
                     this.inSameDoc = true;
                     this.tryMatch = true;
-
+                    
                     this.nextSpanB();
                     continue;
                 }
 
                 // Fetch from second store?
                 else {
+
                     /** TODO: Change this to a single embedded object! */
                     this.embeddedStart = current.start;
                     this.embeddedEnd = current.end;
@@ -658,6 +661,8 @@
         this.wrapEnd = -1;
 
         // Shortcut to prevent lazyloading of .end()
+        //   [---
+        // [---
         if (this.wrapStart > this.embeddedStart) {
             // Can't match for in, rin, ew, sw, and m
             // and will always lead to next_b
@@ -669,6 +674,8 @@
             };
         }
 
+        // [---
+        //   [---
         else if (this.wrapStart < this.embeddedStart) {
             // Can't match for sw and m and will always
             // lead to next_a
@@ -973,6 +980,7 @@
 
             // Load wrapEnd
             this.wrapEnd = this.wrapSpans.end();
+            // this.embeddedEnd = this.embeddedSpans.end();
 
             // Case 6
             // |---|
@@ -1138,7 +1146,6 @@
 
         public short elementRef = -1;
 
-
         public void clear () {
             this.start = -1;
             this.end = -1;
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAlterQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAlterQueryWrapper.java
index 6503b3f..a7b55cf 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAlterQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAlterQueryWrapper.java
@@ -103,22 +103,39 @@
     };
 
 
+    /*
+     * The query is extended to right in case one alternative is extended to the right.
+     */
     @Override
-    public SpanQuery toQuery () throws QueryException {
+    public boolean isExtendedToTheRight () {
+        if (this.alternatives.size() == 0)
+            return this.alternatives.get(0).isExtendedToTheRight();
+        Iterator<SpanQueryWrapper> clause = this.alternatives.iterator();
+        while (clause.hasNext()) {
+            if (clause.next().isExtendedToTheRight()) {
+                return true;
+            };
+        };
+        return false;
+    };
+
+
+    @Override
+    public SpanQuery toFragmentQuery () throws QueryException {
         if (this.isNull || this.alternatives.size() == 0)
             return (SpanQuery) null;
 
         if (this.alternatives.size() == 1) {
             return (SpanQuery) this.alternatives.get(0)
-                    .retrieveNode(this.retrieveNode).toQuery();
+                    .retrieveNode(this.retrieveNode).toFragmentQuery();
         };
 
         Iterator<SpanQueryWrapper> clause = this.alternatives.iterator();
         SpanOrQuery soquery = new SpanOrQuery(clause.next()
-                .retrieveNode(this.retrieveNode).toQuery());
+                .retrieveNode(this.retrieveNode).toFragmentQuery());
         while (clause.hasNext()) {
             soquery.addClause(clause.next().retrieveNode(this.retrieveNode)
-                    .toQuery());
+                    .toFragmentQuery());
         };
         return (SpanQuery) soquery;
     };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAttributeQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAttributeQueryWrapper.java
index 968d544..5f11c02 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAttributeQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAttributeQueryWrapper.java
@@ -37,11 +37,11 @@
 
 
     @Override
-    public SpanQuery toQuery () throws QueryException {
+    public SpanQuery toFragmentQuery () throws QueryException {
         if (isNull || isEmpty)
             return null;
 
-        SpanQuery sq = subquery.retrieveNode(this.retrieveNode).toQuery();
+        SpanQuery sq = subquery.retrieveNode(this.retrieveNode).toFragmentQuery();
         if (sq == null) {
             isNull = true;
             return null;
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanClassQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanClassQueryWrapper.java
index 05edf76..51d4ab7 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanClassQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanClassQueryWrapper.java
@@ -66,12 +66,12 @@
     };
 
 
-    public SpanQuery toQuery () throws QueryException {
+    public SpanQuery toFragmentQuery () throws QueryException {
         if (this.subquery.isNull())
             return (SpanQuery) null;
 
         SpanQuery sq = (SpanQuery) this.subquery
-                .retrieveNode(this.retrieveNode).toQuery();
+                .retrieveNode(this.retrieveNode).toFragmentQuery();
 
         if (sq == null)
             return (SpanQuery) null;
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanElementQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanElementQueryWrapper.java
index bb9ddc2..3112dc2 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanElementQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanElementQueryWrapper.java
@@ -26,7 +26,7 @@
 
 
     @Override
-    public SpanQuery toQuery () throws QueryException {
+    public SpanQuery toFragmentQuery () throws QueryException {
         // Todo: Respect request for retrieving node data (i.e. depth information)
         return (SpanQuery) new SpanElementQuery(this.field, this.element);
     };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanFocusQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanFocusQueryWrapper.java
index adcce08..8fadb3e 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanFocusQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanFocusQueryWrapper.java
@@ -49,11 +49,11 @@
     };
 
 
-    public SpanQuery toQuery () throws QueryException {
+    public SpanQuery toFragmentQuery () throws QueryException {
         if (this.subquery.isNull())
             return (SpanQuery) null;
         return new SpanFocusQuery(this.subquery.retrieveNode(this.retrieveNode)
-                .toQuery(), this.number);
+                .toFragmentQuery(), this.number);
     };
 
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapper.java
index 987d21a..2cb72fc 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapper.java
@@ -1,8 +1,10 @@
 package de.ids_mannheim.korap.query.wrap;
 
 import org.apache.lucene.search.spans.SpanQuery;
-
 import de.ids_mannheim.korap.util.QueryException;
+import de.ids_mannheim.korap.query.SpanFocusQuery;
+import de.ids_mannheim.korap.query.SpanClassQuery;
+import de.ids_mannheim.korap.query.SpanWithinQuery;
 
 // TODO: Add warnings and errors - using KrillQuery
 
@@ -43,11 +45,37 @@
      * @return A {@link SpanQuery} object.
      * @throws QueryException
      */
-    public SpanQuery toQuery () throws QueryException {
+    public SpanQuery toFragmentQuery () throws QueryException {
+        System.err.println("||||||||||||||||||||||||||");
         return (SpanQuery) null;
     };
 
 
+
+    /**
+     * Serialize the wrapped query and return a SpanQuery.
+     * This will be the final query and may be rewritten.
+     * 
+     * @return A {@link SpanQuery} object.
+     * @throws QueryException
+     */
+    public SpanQuery toQuery () throws QueryException {
+
+        if (this.isNull() || this.isEmpty())
+            return null;
+
+        // Wrap the query in a <base/s=t>, if it's extended to the right
+        if (this.isExtendedToTheRight()) {
+            return new SpanFocusQuery(
+                new SpanWithinQuery(
+                    "base/s:t",
+                    new SpanClassQuery(this.toFragmentQuery(), (byte) 254)), (byte) 254
+            );
+        };
+
+        return this.toFragmentQuery();
+    };
+
     /**
      * Boolean value indicating that the wrapped query
      * is optional.
@@ -149,6 +177,13 @@
     };
 
 
+    public SpanQueryWrapper isExtended (boolean extended) {
+        this.isExtended = extended;
+        return this;
+    };
+
+
+
     /**
      * Boolean value indicating that the wrapped query
      * is extended by a subquery to the right.
@@ -172,6 +207,12 @@
     };
 
 
+    public SpanQueryWrapper isExtendedToTheRight (boolean extended) {
+        this.isExtendedToTheRight = extended;
+        return this;
+    };
+
+
     /**
      * Check, if the wrapped query can be used as an
      * anchor query in a sequence, i.e. a query that
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanReferenceQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanReferenceQueryWrapper.java
index 8b4c54d..48ba7c2 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanReferenceQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanReferenceQueryWrapper.java
@@ -34,13 +34,13 @@
 
 
     @Override
-    public SpanQuery toQuery () throws QueryException {
+    public SpanQuery toFragmentQuery () throws QueryException {
 
         if (this.isNull() || this.isEmpty()) {
             return null;
         }
 
-        SpanQuery sq = subQuery.retrieveNode(this.retrieveNode).toQuery();
+        SpanQuery sq = subQuery.retrieveNode(this.retrieveNode).toFragmentQuery();
         if (sq == null)
             return null;
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRegexQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRegexQueryWrapper.java
index 24317ad..30ea49b 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRegexQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRegexQueryWrapper.java
@@ -47,7 +47,7 @@
     };
 
 
-    public SpanQuery toQuery () {
+    public SpanQuery toFragmentQuery () {
         return this.query;
     };
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRelationWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRelationWrapper.java
index 992787c..3eea9c8 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRelationWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRelationWrapper.java
@@ -37,14 +37,14 @@
 
 
     @Override
-    public SpanQuery toQuery () throws QueryException {
+    public SpanQuery toFragmentQuery () throws QueryException {
 
         if (this.isNull() || this.isEmpty()) {
             return null;
         }
 
         SpanTermQuery relationTermQuery = (SpanTermQuery) relationQuery
-                .retrieveNode(this.retrieveNode).toQuery();
+                .retrieveNode(this.retrieveNode).toFragmentQuery();
         if (relationTermQuery == null)
             return null;
 
@@ -54,7 +54,7 @@
         if (subQuery1.isEmpty) {
             if (!subQuery2.isEmpty) {
                 // match target
-                subq2 = subQuery2.retrieveNode(this.retrieveNode).toQuery();
+                subq2 = subQuery2.retrieveNode(this.retrieveNode).toFragmentQuery();
                 if (subQuery1.hasClass) {
                     rq.setSourceClass(subQuery1.getClassNumber());
                 }
@@ -65,7 +65,7 @@
         else if (subQuery2.isEmpty) {
             if (!subQuery1.isEmpty) {
                 // match source
-                subq1 = subQuery1.retrieveNode(this.retrieveNode).toQuery();
+                subq1 = subQuery1.retrieveNode(this.retrieveNode).toFragmentQuery();
                 if (subQuery2.hasClass) {
                     rq.setTargetClass(subQuery2.getClassNumber());
                 }
@@ -74,8 +74,8 @@
         }
         else {
             // match both
-            subq1 = subQuery1.retrieveNode(this.retrieveNode).toQuery();
-            subq2 = subQuery2.retrieveNode(this.retrieveNode).toQuery();
+            subq1 = subQuery1.retrieveNode(this.retrieveNode).toFragmentQuery();
+            subq2 = subQuery2.retrieveNode(this.retrieveNode).toFragmentQuery();
             return new SpanRelationMatchQuery(rq, subq1, subq2, true);
         }
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
index 3f78fab..dbbdd67 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
@@ -83,7 +83,8 @@
 
 
     // Serialize to Lucene SpanQuery
-    public SpanQuery toQuery () throws QueryException {
+    @Override
+    public SpanQuery toFragmentQuery () throws QueryException {
 
         // The query is null
         if (this.isNull)
@@ -96,11 +97,11 @@
 
         // The query is not a repetition query at all, but may be optional
         if (this.min == 1 && this.max == 1)
-            return this.subquery.retrieveNode(this.retrieveNode).toQuery();
+            return this.subquery.retrieveNode(this.retrieveNode).toFragmentQuery();
 
         // That's a fine repetition query
         return new SpanRepetitionQuery(this.subquery.retrieveNode(
-                this.retrieveNode).toQuery(), this.min, this.max, true);
+                this.retrieveNode).toFragmentQuery(), this.min, this.max, true);
     };
 
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSegmentQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSegmentQueryWrapper.java
index f89c5b7..1b1929b 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSegmentQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSegmentQueryWrapper.java
@@ -195,7 +195,7 @@
     };
 
 
-    public SpanQuery toQuery () throws QueryException {
+    public SpanQuery toFragmentQuery () throws QueryException {
         if (this.isNull || (this.inclusive.size() + this.exclusive.size() == 0)) {
             return (SpanQuery) null;
         }
@@ -219,10 +219,10 @@
 
     private SpanQuery _listToQuery (ArrayList<SpanQueryWrapper> list)
             throws QueryException {
-        SpanQuery query = list.get(0).toQuery();
+        SpanQuery query = list.get(0).toFragmentQuery();
 
         for (int i = 1; i < list.size(); i++) {
-            query = new SpanSegmentQuery(query, list.get(i).toQuery());
+            query = new SpanSegmentQuery(query, list.get(i).toFragmentQuery());
         };
 
         return (SpanQuery) query;
@@ -232,13 +232,13 @@
     private SpanQuery _listToOrQuery (ArrayList<SpanQueryWrapper> list)
             throws QueryException {
         if (list.size() == 1) {
-            return (SpanQuery) list.get(0).toQuery();
+            return (SpanQuery) list.get(0).toFragmentQuery();
         };
 
         Iterator<SpanQueryWrapper> clause = list.iterator();
-        SpanOrQuery soquery = new SpanOrQuery(clause.next().toQuery());
+        SpanOrQuery soquery = new SpanOrQuery(clause.next().toFragmentQuery());
         while (clause.hasNext()) {
-            soquery.addClause(clause.next().toQuery());
+            soquery.addClause(clause.next().toFragmentQuery());
         };
         return (SpanQuery) soquery;
     };
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 2ef20f0..eadba22 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
@@ -19,7 +19,6 @@
 /*
   TODO: Make isNegative work!
   TODO: Make isEmpty work!
-  TODO: Make isExtendedToTheRight work!
   TODO: Evaluate if spanNext(spanNext(a,b),spanNext(c,d)) is faster
         than spanNext(spanNext(spanNext(a,b),c),d)
   TODO: Improve support for SpanElementQueryWrapper in constraints!
@@ -135,7 +134,7 @@
         if (DEBUG) {
             if (!sswq.isEmpty()) {
                 try {
-                    log.trace("New span sequence {}", sswq.toQuery().toString());
+                    log.trace("New span sequence {}", sswq.toFragmentQuery().toString());
                 }
                 catch (QueryException qe) {
                     log.trace("Unable to serialize query {}", qe.getMessage());
@@ -547,7 +546,7 @@
         // Todo: This should possibly be evaluated to a query later on!
         try {
             this.constraints.add(new DistanceConstraint((SpanElementQuery) unit
-                    .retrieveNode(this.retrieveNode).toQuery(), min, max,
+                    .retrieveNode(this.retrieveNode).toFragmentQuery(), min, max,
                     isInOrder, exclusion));
         }
         catch (QueryException qe) {
@@ -638,11 +637,18 @@
         return super.isNegative();
     };
 
-
     public boolean isExtendedToTheRight () {
         if (!this.isSolved)
             _solveProblematicSequence();
-        return this.isExtendedToTheRight;
+
+        int size = this.segments.size();
+
+        // Nothing to do
+        if (size == 0 || this.isNull())
+            return false;
+
+        // Return the value of the last segment
+        return this.segments.get(size - 1).isExtendedToTheRight();
     };
 
 
@@ -652,7 +658,7 @@
      * @return A {@link SpanQuery} object.
      * @throws QueryException
      */
-    public SpanQuery toQuery () throws QueryException {
+    public SpanQuery toFragmentQuery () throws QueryException {
 
         // There was a serialization failure not yet reported
         if (this.constraintException != null)
@@ -676,7 +682,7 @@
             // Unproblematic single query
             if (this.segments.get(0).maybeAnchor())
                 return (SpanQuery) this.segments.get(0)
-                        .retrieveNode(this.retrieveNode).toQuery();
+                        .retrieveNode(this.retrieveNode).toFragmentQuery();
 
             if (this.segments.get(0).isEmpty())
                 throw new QueryException(613,
@@ -708,11 +714,11 @@
         };
 
         // Create the initial query
-        SpanQuery query = null;// = this.segments.get(0).toQuery();
+        SpanQuery query = null;
         int i = 0;
         while (query == null && i < this.segments.size()) {
             query = this.segments.get(i).retrieveNode(this.retrieveNode)
-                    .toQuery();
+                    .toFragmentQuery();
             i++;
         };
 
@@ -724,7 +730,7 @@
             for (; i < this.segments.size(); i++) {
 
                 SpanQuery second = this.segments.get(i)
-                        .retrieveNode(this.retrieveNode).toQuery();
+                        .retrieveNode(this.retrieveNode).toFragmentQuery();
                 if (second == null)
                     continue;
 
@@ -746,7 +752,7 @@
                         throw new QueryException(613, limitationError);
 
                     SpanQuery sq = (SpanQuery) this.segments.get(i)
-                            .retrieveNode(this.retrieveNode).toQuery();
+                            .retrieveNode(this.retrieveNode).toFragmentQuery();
                     if (sq == null)
                         continue;
 
@@ -765,7 +771,7 @@
                         throw new QueryException(613, limitationError);
 
                     SpanQuery sq = (SpanQuery) this.segments.get(i)
-                            .retrieveNode(this.retrieveNode).toQuery();
+                            .retrieveNode(this.retrieveNode).toFragmentQuery();
                     if (sq == null)
                         continue;
 
@@ -786,7 +792,7 @@
                 throw new QueryException(613, limitationError);
 
             SpanQuery sq = (SpanQuery) this.segments.get(i)
-                    .retrieveNode(this.retrieveNode).toQuery();
+                    .retrieveNode(this.retrieveNode).toFragmentQuery();
             if (sq == null)
                 continue;
 
@@ -797,7 +803,6 @@
     };
 
 
-
     /*
       Check if there are problematic segments in the sequence
       (either negative, optional or empty) and deal with them
@@ -938,11 +943,17 @@
                         problem.getClassNumber());
 
             query = new SpanExpansionQuery(anchor.retrieveNode(
-                                                               this.retrieveNode).toQuery(), problem.isOptional() ? 0 : problem.getMin(),
+                                                               this.retrieveNode).toFragmentQuery(), problem.isOptional() ? 0 : problem.getMin(),
                     problem.getMax(), direction,
                     problem.hasClass() ? problem.getClassNumber() : (byte) 0,
                     true);
-            return new SpanSimpleQueryWrapper(query).isExtended(true);
+            SpanQueryWrapper sqw = new SpanSimpleQueryWrapper(query).isExtended(true);
+
+            // Set right extension
+            if (direction >= 0)
+                sqw.isExtendedToTheRight(true);
+
+            return sqw;
         }
 
         // make negative extension to anchor
@@ -955,12 +966,19 @@
                         problem.getClassNumber());
 
             query = new SpanExpansionQuery(anchor.retrieveNode(
-                    this.retrieveNode).toQuery(), problem.retrieveNode(
-                    this.retrieveNode).toQuery(), problem.getMin(),
+                    this.retrieveNode).toFragmentQuery(), problem.retrieveNode(
+                    this.retrieveNode).toFragmentQuery(), problem.getMin(),
                     problem.getMax(), direction,
                     problem.hasClass() ? problem.getClassNumber() : (byte) 0,
                     true);
-            return new SpanSimpleQueryWrapper(query).isExtended(true);
+
+            SpanQueryWrapper sqw = new SpanSimpleQueryWrapper(query).isExtended(true);
+
+            // Set right extension
+            if (direction >= 0)
+                sqw.isExtendedToTheRight(true);
+
+            return sqw;
         };
 
         if (DEBUG)
@@ -979,11 +997,11 @@
         // [base=der][base=baum]
         if (mergeLeft)
             ssqw.append(new SpanSimpleQueryWrapper(problem.retrieveNode(
-                    this.retrieveNode).toQuery()));
+                    this.retrieveNode).toFragmentQuery()));
         // [base=baum][base=der]
         else
             ssqw.prepend(new SpanSimpleQueryWrapper(problem.retrieveNode(
-                    this.retrieveNode).toQuery()));
+                    this.retrieveNode).toFragmentQuery()));
 
         saqw.or(ssqw);
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSimpleQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSimpleQueryWrapper.java
index 28edbf6..61608e5 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSimpleQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSimpleQueryWrapper.java
@@ -26,13 +26,8 @@
     };
 
 
-    public SpanQuery toQuery () {
+    @Override
+    public SpanQuery toFragmentQuery () {
         return this.query;
     };
-
-
-    public SpanSimpleQueryWrapper isExtended (boolean extended) {
-        this.isExtended = true;
-        return this;
-    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSubspanQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSubspanQueryWrapper.java
index ec61e70..8c809c5 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSubspanQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSubspanQueryWrapper.java
@@ -105,12 +105,12 @@
 
 
     @Override
-    public SpanQuery toQuery () throws QueryException {
+    public SpanQuery toFragmentQuery () throws QueryException {
         if (this.isNull()) {
             return null;
         }
 
-        SpanQuery sq = subquery.retrieveNode(this.retrieveNode).toQuery();
+        SpanQuery sq = subquery.retrieveNode(this.retrieveNode).toFragmentQuery();
         if (sq == null)
             return null;
         if (sq instanceof SpanTermQuery) {
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWildcardQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWildcardQueryWrapper.java
index 6eb6bdf..5ac346e 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWildcardQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWildcardQueryWrapper.java
@@ -30,7 +30,7 @@
     };
 
 
-    public SpanQuery toQuery () {
+    public SpanQuery toFragmentQuery () {
         return this.query;
     };
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithAttributeQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithAttributeQueryWrapper.java
index b51557d..435b3ee 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithAttributeQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithAttributeQueryWrapper.java
@@ -118,7 +118,7 @@
 
 
     @Override
-    public SpanQuery toQuery () throws QueryException {
+    public SpanQuery toFragmentQuery () throws QueryException {
 
         if (isNull || isEmpty)
             return null;
@@ -134,7 +134,7 @@
     private SpanQuery createSpecificSpanWithAttributeQuery ()
             throws QueryException {
         SimpleSpanQuery withIdQuery = (SimpleSpanQuery) withIdQueryWrapper
-                .toQuery();
+                .toFragmentQuery();
         if (withIdQuery == null) {
             isNull = true;
             return null;
@@ -169,7 +169,7 @@
 
     private SpanAttributeQuery createSpanAttributeQuery (
             SpanQueryWrapper attrQueryWrapper) throws QueryException {
-        SpanQuery sq = attrQueryWrapper.toQuery();
+        SpanQuery sq = attrQueryWrapper.toFragmentQuery();
         if (sq != null) {
             if (sq instanceof SpanAttributeQuery)
                 return (SpanAttributeQuery) sq;
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java
index 904d771..89d1fc5 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java
@@ -88,16 +88,16 @@
             this.isNull = false;
     };
 
-
-    public SpanQuery toQuery () throws QueryException {
+    @Override
+    public SpanQuery toFragmentQuery () throws QueryException {
         if (this.isNull)
             return (SpanQuery) null;
 
         // TODO: if (wrap.isNegative())
 
         return new SpanWithinQuery(this.element.retrieveNode(this.retrieveNode)
-                .toQuery(),
-                this.wrap.retrieveNode(this.retrieveNode).toQuery(), this.flag);
+                .toFragmentQuery(),
+                this.wrap.retrieveNode(this.retrieveNode).toFragmentQuery(), this.flag);
     };
 
 
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 0ed45b2..922f9ae 100644
--- a/src/main/java/de/ids_mannheim/korap/response/Match.java
+++ b/src/main/java/de/ids_mannheim/korap/response/Match.java
@@ -24,6 +24,7 @@
 import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 
+import static de.ids_mannheim.korap.util.KrillByte.*;
 import de.ids_mannheim.korap.index.AbstractDocument;
 import de.ids_mannheim.korap.index.PositionsToOffset;
 import de.ids_mannheim.korap.query.SpanElementQuery;
@@ -232,11 +233,10 @@
 
                 // Todo element searches!
 
-                // Highlights!
+                // Highlights! This is a class PTI
                 if (b[0] == 0) {
                     bb.put(b);
                     bb.position(1); // Ignore PTI
-
                     int start = bb.getInt();
                     int end = bb.getInt();
                     byte number = bb.get();
@@ -244,18 +244,18 @@
                     if (DEBUG)
                         log.trace(
                                 "Have a highlight of class {} in {}-{} inside of {}-{}",
-                                number, start, end, this.getStartPos(),
+                                unsignedByte(number), start, end, this.getStartPos(),
                                 this.getEndPos());
 
                     // Ignore classes out of match range and set by the system
                     // TODO: This may be decidable by PTI!
-                    if ((number & 0xFF) <= 128 && start >= this.getStartPos()
+                    if (unsignedByte(number) <= 128 && start >= this.getStartPos()
                             && end <= this.getEndPos()) {
-                        log.trace("Add highlight of class {}!", number);
+                        log.trace("Add highlight of class {}!", unsignedByte(number));
                         this.addHighlight(start, end - 1, number);
                     }
                     else if (DEBUG) {
-                        log.trace("Don't add highlight of class {}!", number);
+                        log.trace("Don't add highlight of class {}!", unsignedByte(number));
                     };
                 }
 
@@ -1027,7 +1027,10 @@
     };
 
 
-
+    /*
+     * This takes a clean string and the tag stack
+     * to decorate the string with annotations.
+     */
     private void _processHighlightSnippet (String clean, ArrayList<int[]> stack) {
 
         if (DEBUG)
@@ -1037,7 +1040,10 @@
 
         this.snippetArray = new HighlightCombinator();
 
+        // Iterate over all elements of the stack
         for (int[] element : stack) {
+
+            // The position
             pos = element[3] != 0 ? element[0] : element[1];
 
             if (pos > oldPos) {
diff --git a/src/main/java/de/ids_mannheim/korap/util/KrillByte.java b/src/main/java/de/ids_mannheim/korap/util/KrillByte.java
index 419a43f..0666cc7 100644
--- a/src/main/java/de/ids_mannheim/korap/util/KrillByte.java
+++ b/src/main/java/de/ids_mannheim/korap/util/KrillByte.java
@@ -62,4 +62,15 @@
             number |= (data[offset - i] & 0xff) << (i << 3);
         return number;
     };
+
+
+    /**
+     * Return the unsigned value of a byte.
+     * 
+     * @param data
+     *            The byte.
+     */ 
+    public static int unsignedByte (byte data) {
+        return (int) data & 0xFF;
+    };
 };
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 c618521..9b8e374 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
@@ -329,6 +329,8 @@
         ki.addDoc(createFieldDoc2()); // only main clause
         ki.commit();
 
+        // Warning: This is not armoured by <base/s=t>!
+
         // See /queries/bugs/repetition_group_rewrite
         // spanRepetition(spanExpansion(
         //     SpanMultiTermQueryWrapper(tokens:/cnx/p:A/), []{1, 1}, right){2,2}
@@ -341,13 +343,19 @@
         SpanRepetitionQuery rep = new SpanRepetitionQuery(seq, 2, 2, true);
 
         kr = ki.search(rep, (short) 20);
+
+        for (Match km : kr.getMatches()){
+            System.out.println(
+                               km.getStartPos() +
+                               "," +
+                               km.getEndPos() +
+                               " " +
+                               km.getSnippetBrackets()
+                               );
+        };
+
         assertEquals((long) 3, kr.getTotalResults());
 
-        /*
-         * for (Match km : kr.getMatches()){
-         * System.out.println(km.getStartPos() +","+km.getEndPos()+" "
-         * +km.getSnippetBrackets() ); }
-         */
     }
 
 
@@ -361,9 +369,8 @@
     @Test
     public void testExpansionQueryBug3 () throws IOException, QueryException {
         KrillIndex ki = new KrillIndex();
-        ki.addDoc(createFieldDoc0()); // same doc
-        ki.addDoc(createFieldDoc1()); // only not clause
-        ki.addDoc(createFieldDoc2()); // only main clause
+        ki.addDoc(createFieldDoc3());
+        ki.addDoc(createFieldDoc4());
         ki.commit();
 
         String json = readFile(getClass().getResource(
@@ -371,22 +378,23 @@
         );
         KrillQuery kq = new KrillQuery("base");
         SpanQuery sq = kq.fromJson(json).toQuery();
-        /*
-        assertEquals(sq.toString(),
-                     "spanExpansion(base:s:a, []{0, 100}, right)");
-        */
-        kr = ki.search(sq, (short) 11);
-        assertEquals((long) 1111, kr.getTotalResults());
+        assertEquals(sq.toString(),"focus(254: spanContain(<base:base/s:t />, {254: spanExpansion(base:s:c, []{0, 4}, right)}))");
 
-        assertEquals("[c]eccecd ...",kr.getMatch(0).getSnippetBrackets());
-        assertEquals("[ce]ccecde ...",kr.getMatch(1).getSnippetBrackets());
-        assertEquals("",kr.getMatch(10).getSnippetBrackets());
-        assertEquals("",kr.getMatch(11).getSnippetBrackets());
-        /*
-        assertEquals("[ce]cceecde",kr.getMatch(1).getSnippetBrackets());
-        assertEquals("[cecceecde]",kr.getMatch(10).getSnippetBrackets());
-        assertEquals("[bb]ccdd",kr.getMatch(11).getSnippetBrackets());
-        */
+        kr = ki.search(sq, (short) 10);
+
+        assertEquals("[c]ab",kr.getMatch(0).getSnippetBrackets());
+        assertEquals("[ca]b",kr.getMatch(1).getSnippetBrackets());
+        assertEquals("[cab]",kr.getMatch(2).getSnippetBrackets());
+        assertEquals("[c]e",kr.getMatch(3).getSnippetBrackets());
+        assertEquals("[ce]",kr.getMatch(4).getSnippetBrackets());
+        assertEquals(5, kr.getTotalResults());
+
+        sq = kq.builder().tag("base/s:t").toQuery();
+        assertEquals(sq.toString(),"<base:base/s:t />");
+        kr = ki.search(sq, (short) 5);
+        assertEquals("[cab]", kr.getMatch(0).getSnippetBrackets());
+        assertEquals("[ce]", kr.getMatch(1).getSnippetBrackets());
+        assertEquals(2, kr.getTotalResults());
     }
 
 
@@ -395,12 +403,17 @@
     private FieldDocument createFieldDoc0 () {
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-0");
-        fd.addTV("base", "ceccecdeec", "[(0-1)s:c|_0$<i>0<i>1]"
-                + "[(1-2)s:e|_1$<i>1<i>2]" + "[(2-3)s:c|_2$<i>2<i>3]"
-                + "[(3-4)s:c|s:d|_3$<i>3<i>4]" + "[(4-5)s:e|_4$<i>4<i>5]"
-                + "[(5-6)s:c|_5$<i>5<i>6]" + "[(6-7)s:d|_6$<i>6<i>7]"
-                + "[(7-8)s:e|_7$<i>7<i>8]" + "[(8-9)s:e|_8$<i>8<i>9]"
-                + "[(9-10)s:c|_9$<i>9<i>10]");
+        fd.addTV("base", "ceccecdeec",
+                 "[(0-1)s:c|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>10<i>10<b>0]"
+                 + "[(1-2)s:e|_1$<i>1<i>2]"
+                 + "[(2-3)s:c|_2$<i>2<i>3]"
+                 + "[(3-4)s:c|s:d|_3$<i>3<i>4]"
+                 + "[(4-5)s:e|_4$<i>4<i>5]"
+                 + "[(5-6)s:c|_5$<i>5<i>6]"
+                 + "[(6-7)s:d|_6$<i>6<i>7]"
+                 + "[(7-8)s:e|_7$<i>7<i>8]"
+                 + "[(8-9)s:e|_8$<i>8<i>9]"
+                 + "[(9-10)s:c|_9$<i>9<i>10]");
         return fd;
     }
 
@@ -408,10 +421,13 @@
     private FieldDocument createFieldDoc1 () {
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-1");
-        fd.addTV("base", "bbccdd", "[(0-1)s:b|s:c|_0$<i>0<i>1]"
-                + "[(1-2)s:b|_1$<i>1<i>2]" + "[(2-3)s:c|_2$<i>2<i>3]"
-                + "[(3-4)s:c|_3$<i>3<i>4]" + "[(4-5)s:d|_4$<i>4<i>5]"
-                + "[(5-6)s:d|_5$<i>5<i>6]");
+        fd.addTV("base", "bbccdd",
+                 "[(0-1)s:b|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>6<i>6<b>0]]"
+                 + "[(1-2)s:b|_1$<i>1<i>2]"
+                 + "[(2-3)s:c|_2$<i>2<i>3]"
+                 + "[(3-4)s:c|_3$<i>3<i>4]"
+                 + "[(4-5)s:d|_4$<i>4<i>5]"
+                 + "[(5-6)s:d|_5$<i>5<i>6]");
         return fd;
     }
 
@@ -419,10 +435,34 @@
     private FieldDocument createFieldDoc2 () {
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-2");
-        fd.addTV("base", "beccea", "[(0-1)s:b|s:c|_0$<i>0<i>1]"
-                + "[(1-2)s:e|_1$<i>1<i>2]" + "[(2-3)s:c|_2$<i>2<i>3]"
-                + "[(3-4)s:c|_3$<i>3<i>4]" + "[(4-5)s:e|_4$<i>4<i>5]"
-                + "[(5-6)s:a|_5$<i>5<i>6]");
+        fd.addTV("base", "beccea",
+                 "[(0-1)s:b|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>6<i>6<b>0]]"
+                 + "[(1-2)s:e|_1$<i>1<i>2]"
+                 + "[(2-3)s:c|_2$<i>2<i>3]"
+                 + "[(3-4)s:c|_3$<i>3<i>4]"
+                 + "[(4-5)s:e|_4$<i>4<i>5]"
+                 + "[(5-6)s:a|_5$<i>5<i>6]");
+        return fd;
+    }
+
+
+    private FieldDocument createFieldDoc3 () {
+        FieldDocument fd = new FieldDocument();
+        fd.addString("ID", "doc-3");
+        fd.addTV("base", "cab",
+                 "[(0-1)s:c|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>3<i>3<b>0]]"
+                 + "[(1-2)s:a|_1$<i>1<i>2]"
+                 + "[(2-3)s:b|_2$<i>2<i>3]");
+        return fd;
+    }
+
+
+    private FieldDocument createFieldDoc4 () {
+        FieldDocument fd = new FieldDocument();
+        fd.addString("ID", "doc-3");
+        fd.addTV("base", "ce",
+                 "[(0-1)s:c|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>2<i>2<b>0]]"
+                 + "[(1-2)s:e|_1$<i>1<i>2]");
         return fd;
     }
 
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 78d623c..cbe6a87 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
@@ -854,12 +854,14 @@
         // Case 1, 6, 7, 13
         // xy<a><a>x</a>b<a>c</a></a>x
         FieldDocument fd = new FieldDocument();
-        fd.addTV("base", "x  y  x  b  c  x  ", "[(0-3)s:x|_0$<i>0<i>3]"
-                + "[(3-6)s:y|_1$<i>3<i>6]"
-                + "[(6-9)s:x|_2$<i>6<i>9|<>:a$<b>64<i>6<i>9<i>3<b>0|"
-                + "<>:a$<b>64<i>6<i>15<i>5<b>0]" + "[(9-12)s:b|_3$<i>9<i>12]"
-                + "[(12-15)s:c|_4$<i>12<i>15|<>:a$<b>64<i>12<i>15<i>5<b>0]"
-                + "[(15-18)s:x|_5$<i>15<i>18]");
+        fd.addTV("base", "x  y  x  b  c  x  ",
+                 "[(0-3)s:x|_0$<i>0<i>3]"
+                 + "[(3-6)s:y|_1$<i>3<i>6]"
+                 + "[(6-9)s:x|_2$<i>6<i>9|<>:a$<b>64<i>6<i>9<i>3<b>0|"
+                 + "<>:a$<b>64<i>6<i>15<i>5<b>0]" +
+                 "[(9-12)s:b|_3$<i>9<i>12]"
+                 + "[(12-15)s:c|_4$<i>12<i>15|<>:a$<b>64<i>12<i>15<i>5<b>0]"
+                 + "[(15-18)s:x|_5$<i>15<i>18]");
         ki.addDoc(fd);
 
         // Save documents
@@ -870,9 +872,14 @@
         SpanQuery sq = new SpanWithinQuery(new SpanElementQuery("base", "a"),
                 new SpanTermQuery(new Term("base", "s:x")));
 
+        assertEquals("spanContain(<base:a />, base:s:x)", sq.toString());
         Result kr = ki.search(sq, (short) 10);
 
         assertEquals("totalResults", kr.getTotalResults(), 2);
+
+        assertEquals("x  y  [x  ]b  c  x  ", kr.getMatch(0).getSnippetBrackets());
+        assertEquals("x  y  [x  b  c  ]x  ", kr.getMatch(1).getSnippetBrackets());
+
         assertEquals("StartPos (0)", 2, kr.getMatch(0).startPos);
         assertEquals("EndPos (0)", 3, kr.getMatch(0).endPos);
         assertEquals("StartPos (1)", 2, kr.getMatch(1).startPos);
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKrillQuery.java b/src/test/java/de/ids_mannheim/korap/query/TestKrillQuery.java
index e379301..4c1776b 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestKrillQuery.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKrillQuery.java
@@ -309,7 +309,7 @@
     public void KorapSequenceWithEmptyRepetitionQuery () throws QueryException {
         QueryBuilder kq = new QueryBuilder("field");
         SpanQuery sq = kq.seq(kq.seg("try")).append(kq.repeat(kq.empty(),0,100)).toQuery();
-        assertEquals("spanExpansion(field:try, []{0, 100}, right)",sq.toString());
+        assertEquals("focus(254: spanContain(<field:base/s:t />, {254: spanExpansion(field:try, []{0, 100}, right)}))",sq.toString());
     };
 
 
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
index d44a260..bbc0298 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
@@ -546,7 +546,7 @@
             KrillQuery kq = new KrillQuery("tokens");
 
             assertEquals(kq.fromJson(json).toQuery().toString(),
-                    "spanExpansion(tokens:s:c, []{0, 100}, right)");
+                    "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:c, []{0, 100}, right)}))");
         }
         catch (QueryException e) {
             fail(e.getMessage());
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQueryJSON.java
index 8762e4f..6b3285c 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQueryJSON.java
@@ -38,7 +38,7 @@
     public void queryJSONseqEmptyEnd () throws QueryException {
         SpanQueryWrapper sqwi = jsonQueryFile("empty-last.jsonld");
         assertEquals(sqwi.toQuery().toString(),
-                "spanExpansion(tokens:s:der, []{1, 1}, right)");
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:der, []{1, 1}, right)}))");
     };
 
 
@@ -47,7 +47,7 @@
         SpanQueryWrapper sqwi = jsonQueryFile("empty-last-class.jsonld");
         // der{3:[]}
         assertEquals(sqwi.toQuery().toString(),
-                "spanExpansion(tokens:s:der, []{1, 1}, right, class:3)");
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:der, []{1, 1}, right, class:3)}))");
     };
 
 
@@ -56,7 +56,7 @@
         SpanQueryWrapper sqwi = jsonQueryFile("empty-last-repetition.jsonld");
         // der[]{3,5}
         assertEquals(sqwi.toQuery().toString(),
-                "spanExpansion(tokens:s:der, []{3, 5}, right)");
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:der, []{3, 5}, right)}))");
     };
 
 
@@ -128,7 +128,7 @@
         SpanQueryWrapper sqwi = jsonQueryFile("empty-surround.jsonld");
         // [][tt/p=NN][]
         assertEquals(sqwi.toQuery().toString(),
-                "spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left), []{1, 1}, right)");
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left), []{1, 1}, right)}))");
     };
 
 
@@ -138,7 +138,7 @@
         // [][tt/p=NN]{2:[]}
         assertEquals(
                 sqwi.toQuery().toString(),
-                "spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left), []{1, 1}, right, class:2)");
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left), []{1, 1}, right, class:2)}))");
     };
 
 
@@ -148,7 +148,7 @@
         // {3:[]}[tt/p=NN]{2:[]}
         assertEquals(
                 sqwi.toQuery().toString(),
-                "spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left, class:3), []{1, 1}, right, class:2)");
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left, class:3), []{1, 1}, right, class:2)}))");
     };
 
 
@@ -157,7 +157,7 @@
         SpanQueryWrapper sqwi = jsonQueryFile("empty-surround-repetition.jsonld");
         // [][tt/p=NN][]{2,7}
         assertEquals(sqwi.toQuery().toString(),
-                "spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left), []{2, 7}, right)");
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left), []{2, 7}, right)}))");
     };
 
 
@@ -166,7 +166,7 @@
         SpanQueryWrapper sqwi = jsonQueryFile("empty-surround-repetition-2.jsonld");
         // []{3,5}[tt/p=NN][]{2,7}
         assertEquals(sqwi.toQuery().toString(),
-                "spanExpansion(spanExpansion(tokens:tt/p:NN, []{3, 5}, left), []{2, 7}, right)");
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{3, 5}, left), []{2, 7}, right)}))");
     };
 
 
@@ -179,7 +179,7 @@
         // {1:[]{3,8}}[tt/p=NN]{2:[]}{2,7}
         assertEquals(
                 sqwi.toQuery().toString(),
-                "spanExpansion(spanExpansion(tokens:tt/p:NN, []{3, 8}, left, class:1), []{2, 7}, right, class:2)");
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{3, 8}, left, class:1), []{2, 7}, right, class:2)}))");
     };
 
 
@@ -205,7 +205,7 @@
         SpanQueryWrapper sqwi = jsonQueryFile("negative-last.jsonld");
         // [tt/p=NN][tt/p!=NN]
         assertEquals(sqwi.toQuery().toString(),
-                "spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{1, 1}, right)");
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{1, 1}, right)}))");
     };
 
 
@@ -241,7 +241,7 @@
         // [tt/p=NN]{2:[tt/p!=NN]}
         SpanQuery sq = sqwi.toQuery();
         assertEquals(sq.toString(),
-                "spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{1, 1}, right, class:2)");
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{1, 1}, right, class:2)}))");
     };
 
 
@@ -250,7 +250,7 @@
         SpanQueryWrapper sqwi = jsonQueryFile("negative-last-class-repetition.jsonld");
         // [tt/p=NN]{2:[tt/p!=NN]{4,5}}
         assertEquals(sqwi.toQuery().toString(),
-                "spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{4, 5}, right, class:2)");
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{4, 5}, right, class:2)}))");
     };
 
 
@@ -260,7 +260,7 @@
         SpanQueryWrapper sqwi = jsonQueryFile("negative-last-class-repetition-2.jsonld");
         // [tt/p=NN]{2:[tt/p!=NN]}{4,5}
         assertEquals(sqwi.toQuery().toString(),
-                "spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{4, 5}, right, class:2)");
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{4, 5}, right, class:2)}))");
     };
 
 
@@ -284,7 +284,7 @@
         SpanQueryWrapper sqwi = jsonQueryFile("negative-last-sequence.jsonld");
         // [tt/p=NN]([tt/p!=DET][tt/p!=NN])
         assertEquals(
-                "spanExpansion(spanExpansion(tokens:tt/p:NN, !tokens:tt/p:DET{1, 1}, right), !tokens:tt/p:ADJ{1, 1}, right)",
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, !tokens:tt/p:DET{1, 1}, right), !tokens:tt/p:ADJ{1, 1}, right)}))",
                 sqwi.toQuery().toString());
     };
 
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanSubspanQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanSubspanQueryJSON.java
index 273c5cd..d0db622 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanSubspanQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanSubspanQueryJSON.java
@@ -154,7 +154,7 @@
                 "/queries/submatch/embedded-valid-empty.jsonld").getFile();
         SpanQueryWrapper sqwi = getJSONQuery(filepath);
         SpanQuery sq = sqwi.toQuery();
-        assertEquals("spanExpansion(tokens:s:die, []{2, 5}, right)",
+        assertEquals("focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:die, []{2, 5}, right)}))",
                 sq.toString());
     }
 
@@ -178,7 +178,7 @@
         SpanQueryWrapper sqwi = getJSONQuery(filepath);
         SpanQuery sq = sqwi.toQuery();
         assertEquals(
-                "spanExpansion(tokens:s:das, !tokens:l:Baum{1, 1}, right)",
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:das, !tokens:l:Baum{1, 1}, right)}))",
                 sq.toString());
     }
 
@@ -191,7 +191,7 @@
         SpanQueryWrapper sqwi = getJSONQuery(filepath);
         SpanQuery sq = sqwi.toQuery();
         assertEquals(
-                "spanExpansion(tokens:s:das, !tokens:l:Baum{1, 1}, right, class:1)",
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:das, !tokens:l:Baum{1, 1}, right, class:1)}))",
                 sq.toString());
     }
 
@@ -245,7 +245,7 @@
         SpanQueryWrapper sqwi = getJSONQuery(filepath);
         SpanQuery sq = sqwi.toQuery();
         assertEquals(
-                "spanExpansion(tokens:s:das, !tokens:l:Baum{2, 2}, right)",
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:das, !tokens:l:Baum{2, 2}, right)}))",
                 sq.toString());
     }
 }
diff --git a/src/test/resources/queries/bugs/expansion_bug_3.jsonld b/src/test/resources/queries/bugs/expansion_bug_3.jsonld
index 966dbd8..53f550f 100644
--- a/src/test/resources/queries/bugs/expansion_bug_3.jsonld
+++ b/src/test/resources/queries/bugs/expansion_bug_3.jsonld
@@ -23,9 +23,11 @@
 	],
 	"boundary":{
 	  "@type":"koral:boundary",
-	  "min":0
+	  "min":0,
+	  "max":4
 	},
-	"min":0
+	"min":0,
+	"max":4
       }
     ]
   },
