diff --git a/src/main/java/de/ids_mannheim/korap/KrillIndex.java b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
index 44528f0..e4535c0 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
@@ -118,7 +118,7 @@
     // TODO: Use configuration instead.
     // Last line of defense against DOS
     private int autoCommit = 500;
-    private String version = "unknown";
+    private String version = "Unknown";
     private String name = "Unknown";
 
     // Temp:
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
index 8227bda..ba056d1 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
@@ -77,12 +77,17 @@
         super(spanElementQuery, context, acceptDocs, termContexts);
         termSpans = (TermSpans) this.firstSpans;
         hasMoreSpans = true;
-        // termSpans.next();
+        if (DEBUG)
+            log.trace("Create ElementSpan");
     };
 
 
     @Override
     public boolean next () throws IOException {
+
+        if (DEBUG)
+            log.trace("Next element span for element");
+
         if (!hasMoreSpans || !(hasMoreSpans = termSpans.next()))
             return false;
 
@@ -94,8 +99,6 @@
 
 
     private boolean advance () throws IOException {
-
-
         this.matchStartPosition = termSpans.start();
         this.matchDocNumber = termSpans.doc();
         isPayloadLoaded = false;
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index fd0328d..78bf62e 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 b85206e..ce6dac3 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
@@ -16,8 +16,10 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.KrillQuery;
+import de.ids_mannheim.korap.query.QueryBuilder;
 import de.ids_mannheim.korap.query.SpanClassQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.query.SpanWithinQuery;
 import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
@@ -1055,14 +1057,14 @@
 
     /** SpanElementQueries */
     @Test
-    public void indexExample8 () throws IOException {
+    public void indexExample8 () throws QueryException, IOException {
         KrillIndex ki = new KrillIndex();
         FieldDocument fd = new FieldDocument();
         // <a>xx <e>hi j <e>hi j</e></e></a>
         fd.addTV(
                 "base",
                 "xx hi j hi j",
-                "[(0-1)s:x|i:x|_0$<i>0<i>1|<>:a$<b>64<i>1<i>12<i>8<b>0]"
+                "[(0-1)s:x|i:x|_0$<i>0<i>1|<>:a$<b>64<i>0<i>12<i>8<b>0]"
                         + "[(1-2)s:x|i:x|_1$<i>1<i>2]"
                         + "[(3-4)s:h|i:h|_2$<i>3<i>4|<>:e$<b>64<i>3<i>12<i>8<b>0]"
                         + "[(4-5)s:i|i:i|_3$<i>4<i>5]"
@@ -1071,8 +1073,30 @@
                         + "[(9-10)s:i|i:i|_6$<i>9<i>10]"
                         + "[(11-12)s:j|i:j|_7$<i>11<i>12]");
         ki.addDoc(fd);
+        ki.commit();
 
-        // TODO!!
+        assertEquals(1, ki.numberOf("documents"));
+
+        QueryBuilder qb = new KrillQuery("base").builder();
+        SpanQueryWrapper sqw = qb.seg("i:x");
+        Result kr = ki.search(sqw.toQuery(), (short) 10);
+        assertEquals(2, kr.getTotalResults());
+
+        sqw = qb.tag("a");
+        kr = ki.search(sqw.toQuery(), (short) 10);
+        assertEquals(1, kr.getTotalResults());
+
+        sqw = qb.startswith(qb.tag("a"), qb.seg("i:x"));
+        assertEquals("spanStartsWith(<base:a />, base:i:x)",
+                     sqw.toQuery().toString());
+        kr = ki.search(sqw.toQuery(), (short) 10);
+        assertEquals(1, kr.getTotalResults());
+
+        sqw = qb.startswith(qb.tag("e"), qb.seg("i:h"));
+        assertEquals("spanStartsWith(<base:e />, base:i:h)",
+                     sqw.toQuery().toString());
+        kr = ki.search(sqw.toQuery(), (short) 10);
+        assertEquals(2, kr.getTotalResults());
     };
 
 
