diff --git a/src/main/java/de/ids_mannheim/korap/KrillIndex.java b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
index b58ef0c..7c52a10 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
@@ -1334,15 +1334,14 @@
             // Rewrite query (for regex and wildcard queries)
             // Revise!
             // Based on core/src/java/org/apache/lucene/search/IndexSearcher.java
-            // and highlighter/src/java/org/apache/lucene/search/postingshighlight/PostingsHighlighter.java
-            for (Query rewrittenQuery = query
-                    .rewrite(this.reader()); !rewrittenQuery
-                            .equals(query); rewrittenQuery = query
-                                    .rewrite(this.reader())) {
+            // and highlighter/src/java/org/apache/lucene/search/
+			//   postingshighlight/PostingsHighlighter.java
+            for (Query rewrittenQuery = query.rewrite(this.reader());
+				 !rewrittenQuery.equals(query);
+				 rewrittenQuery = query.rewrite(this.reader())) {
                 query = (SpanQuery) rewrittenQuery;
             };
 
-
             // Todo: run this in a separated thread
             for (LeafReaderContext atomic : this.reader().leaves()) {
 
@@ -1507,6 +1506,7 @@
 
             kr.setTotalResults(cutoff ? (long) -1 : (long) i);
         }
+
         catch (IOException e) {
             kr.addError(600, "Unable to read index", e.getLocalizedMessage());
             log.warn(e.getLocalizedMessage());
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
index 882bbfd..c731021 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
@@ -144,30 +144,29 @@
     }
 
 
-//  assertEquals(sqwi.toQuery().toString(),"spanMultipleDistance({129: SpanMultiTermQueryWrapper(tokens:s:meine*)}, "+
-  //                 "{129: tokens:l:Erfahrung}, "+
-  //                 "[(w[1:2], ordered, notExcluded), "+
-  //                 "(base/s:s[0:0], ordered, notExcluded)])");
+    //  assertEquals(sqwi.toQuery().toString(),"spanMultipleDistance({129: SpanMultiTermQueryWrapper(tokens:s:meine*)}, "+
+	//                 "{129: tokens:l:Erfahrung}, "+
+	//                 "[(w[1:2], ordered, notExcluded), "+
+	//                 "(base/s:s[0:0], ordered, notExcluded)])");
 
-  @Test
-  public void testQueryWithWildCard () throws IOException {
-      // meine* /+w1:2,s0 &Erfahrung
-      ki = new KrillIndex();
-      ki.addDoc(createFieldDoc5());
-      ki.commit();
+	@Test
+	public void testQueryWithWildCard () throws IOException {
+		// meine* /+w1:2,s0 &Erfahrung
+		ki = new KrillIndex();
+		ki.addDoc(createFieldDoc5());
+		ki.commit();
       
-      WildcardQuery wcquery = new WildcardQuery(new Term("base", "meine*"));
-      SpanMultiTermQueryWrapper<WildcardQuery> mtq =
+		WildcardQuery wcquery = new WildcardQuery(new Term("base", "s:Meine*"));
+		SpanMultiTermQueryWrapper<WildcardQuery> mtq =
             new SpanMultiTermQueryWrapper<WildcardQuery>(wcquery);
+
+		assertEquals(wcquery.toString(), "base:s:Meine*");
       
-      kr = ki.search(mtq, (short) 10);
-//      for (Match m: kr.getMatches()){
-//          System.out.println(m.getStartPos() + ", "+ m.getEndPos());
-//      }
-      assertEquals(3, kr.getMatches().size());
-      assertEquals(0, kr.getMatch(0).getStartPos());
-      assertEquals(1, kr.getMatch(0).getEndPos());
-  }
+		kr = ki.search(mtq, (short) 10);
+		assertEquals(4, kr.getMatches().size());
+		assertEquals(0, kr.getMatch(0).getStartPos());
+		assertEquals(1, kr.getMatch(0).getEndPos());
+	}
     
     @Test
     public void testUnorderedTokenDistance () throws IOException {
