diff --git a/src/main/java/de/ids_mannheim/korap/KrillIndex.java b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
index 7338472..1ed2b33 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
@@ -114,7 +114,7 @@
     private final static Logger log = LoggerFactory.getLogger(KrillIndex.class);
 
     // This advices the java compiler to ignore all loggings
-    public static final boolean DEBUG = true;
+    public static final boolean DEBUG = false;
 
     // TODO: Use configuration instead.
     // Last line of defense against DOS
@@ -1361,11 +1361,11 @@
 
                     if (DEBUG) {
                         if (match.getDocID() != null)
-                            log.trace("I've got a match in {} of {}",
-                                    match.getDocID(), count);
+                            log.trace("With DocID: I've got 1 match of {} in {}",
+                                      count, match.getDocID());
                         else
-                            log.trace("I've got a match in {} of {}",
-                                    match.getUID(), count);
+                            log.trace("With UID: I've got 1 match of {} in {}",
+                                      count, match.getUID());
                     };
 
                     atomicMatches.add(match);
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 539c331..63c665e 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
@@ -655,7 +655,6 @@
 
         if (this.embeddedStart == -1) {
             this.embeddedStart = this.embeddedSpans.start();
-            this.embeddedEnd = this.embeddedSpans.end();
         };
 
         this.wrapEnd = -1;
@@ -687,6 +686,10 @@
             };
         };
 
+        if (this.embeddedEnd == -1) {
+            this.embeddedEnd = this.embeddedSpans.end();
+        };
+
         // Now check correctly
         byte currentCase = this.withinCase();
 
@@ -935,6 +938,15 @@
     // Return case number
     private byte withinCase () {
 
+        if (DEBUG) {
+            log.trace(">>>>>>>>>>>>>> {}-{}|{}-{}",
+                      this.wrapStart,
+                      this.wrapSpans.end(),
+                      this.embeddedStart,
+                      this.embeddedSpans.end()
+                      );
+        };
+
         // case 1-5
         if (this.wrapStart > this.embeddedStart) {
 
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 922f9ae..4bb289a 100644
--- a/src/main/java/de/ids_mannheim/korap/response/Match.java
+++ b/src/main/java/de/ids_mannheim/korap/response/Match.java
@@ -251,7 +251,11 @@
                     // TODO: This may be decidable by PTI!
                     if (unsignedByte(number) <= 128 && start >= this.getStartPos()
                             && end <= this.getEndPos()) {
-                        log.trace("Add highlight of class {}!", unsignedByte(number));
+
+                        if (DEBUG) {
+                            log.trace("Add highlight of class {}!", unsignedByte(number));
+                        };
+
                         this.addHighlight(start, end - 1, number);
                     }
                     else if (DEBUG) {
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index b8bf604..5fed33b 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
@@ -28,9 +28,9 @@
 # log4j.logger.de.ids_mannheim.korap.response.Match = TRACE, stdout
 
 # Index:
-log4j.logger.de.ids_mannheim.korap.KrillIndex = TRACE, stdout
-log4j.logger.de.ids_mannheim.korap.index.PositionsToOffset = TRACE, stdout
-log4j.logger.de.ids_mannheim.korap.index.MultiTermTokenStream = TRACE, stdout
+# log4j.logger.de.ids_mannheim.korap.KrillIndex = TRACE, stdout
+# log4j.logger.de.ids_mannheim.korap.index.PositionsToOffset = TRACE, stdout
+# log4j.logger.de.ids_mannheim.korap.index.MultiTermTokenStream = TRACE, stdout
 
 # Tests:
 # log4j.logger.de.ids_mannheim.korap.index.TestSegmentIndex = TRACE, stdout
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 ee6c20b..423645e 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
@@ -31,14 +31,12 @@
     Result kr;
     KrillIndex ki;
 
-
     public TestSpanExpansionIndex () throws IOException {
         ki = new KrillIndex();
         ki.addDoc(getClass().getResourceAsStream("/wiki/00001.json.gz"), true);
         ki.commit();
     }
 
-
     /**
      * Left and right expansions
      * */
@@ -385,10 +383,10 @@
         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);
