diff --git a/CHANGES b/CHANGES
index 25683d1..9134718 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
         - [feature] Support new index format with more metadata (diewald)
 	- [bugfix] #142 Fixed class spans for skipTo() skips (margaretha)
 	- [feature] Added attribute support to relations (margaretha)
+	- [bugfix] Make classes and shrink default to 1 instead of 0 (diewald)
 
 0.46 2014-10-21
         - [feature] Support for relation queries (margaretha)
diff --git a/src/main/java/de/ids_mannheim/korap/KorapQuery.java b/src/main/java/de/ids_mannheim/korap/KorapQuery.java
index 38e2038..f517c4a 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapQuery.java
@@ -58,7 +58,7 @@
 	STARTSWITH   = SpanWithinQuery.STARTSWITH,
 	MATCH        = SpanWithinQuery.MATCH;
 
-    private static final int MAX_CLASS_NUM = 127;
+    private static final int MAX_CLASS_NUM = 255; // 127;
 
     /**
      * Constructs a new base object for query generation.
@@ -282,8 +282,14 @@
 		    JsonNode distances;
 		    if (firstDistance.get("@type").asText().equals("korap:group"))
 			distances = firstDistance.get("operands");
+
+		    // Support korap distances
 		    else if (firstDistance.get("@type").asText().equals("korap:distance"))
 			distances = json.get("distances");
+
+		    // Support cosmas distances
+		    else if (firstDistance.get("@type").asText().equals("cosmas:distance"))
+			distances = json.get("distances");
 		    else
 			throw new QueryException(612, "No valid distances defined");
 
@@ -292,11 +298,15 @@
 			if (constraint.has("key"))
 			    unit = constraint.get("key").asText();
 
+			/*
 			if (unit.equals("t"))
 			    throw new QueryException(
 				613,
 			        "Text based distances are not supported yet"
                             );
+			*/
+
+
 
 			int min = 0, max = 100;
 			if (constraint.has("boundary")) {
@@ -311,6 +321,20 @@
 				max = constraint.get("max").asInt(100);
 			};
 
+			// Add foundry and layer to the unit for new indices
+			if (constraint.has("foundry") &&
+			    constraint.has("layer") &&
+			    constraint.get("foundry").asText().length() > 0 &&
+			    constraint.get("layer").asText().length() > 0) {
+
+			    StringBuilder value = new StringBuilder();
+			    value.append(constraint.get("foundry").asText());
+			    value.append('/');
+			    value.append(constraint.get("layer").asText());
+			    value.append(':').append(unit);
+			    unit = value.toString();
+			};
+
 			// Sanitize boundary
 			if (max < min)
 			    max = min;
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanClassQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanClassQuery.java
index 16730ce..e493c9e 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanClassQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanClassQuery.java
@@ -24,22 +24,18 @@
 public class SpanClassQuery extends SpanQuery {
     public String field;
     protected byte number;
-    protected SpanQuery highlight;
+    protected SpanQuery operand;
 
-    public SpanClassQuery (SpanQuery highlight, byte number) {
-	this.field = highlight.getField();
-	this.highlight = highlight;
-	if (number <= 15) {
-	    this.number = number;
-	} else{
-	    this.number = (byte) 0;
-	};
+    public SpanClassQuery (SpanQuery operand, byte number) {
+	this.field = operand.getField();
+	this.operand = operand;
+	this.number = number;
     };
 
-    public SpanClassQuery (SpanQuery highlight) {
-	this.field = highlight.getField();
-	this.highlight = highlight;
-	this.number = (byte) 0;
+    public SpanClassQuery (SpanQuery operand) {
+	this.field = operand.getField();
+	this.operand = operand;
+	this.number = (byte) 1;
     };
 
     public byte number () {
@@ -51,14 +47,15 @@
 
     @Override
     public void extractTerms (Set<Term> terms) {
-	this.highlight.extractTerms(terms);
+	this.operand.extractTerms(terms);
     };
 
     @Override
     public String toString (String field) {
 	StringBuffer buffer = new StringBuffer("{");
-	buffer.append((int) this.number).append(": ");
-        buffer.append(this.highlight.toString()).append('}');
+	short classNr = (short) this.number;
+	buffer.append(classNr & 0xFF).append(": ");
+        buffer.append(this.operand.toString()).append('}');
 	buffer.append(ToStringUtils.boost(getBoost()));
 	return buffer.toString();
     };
@@ -68,7 +65,7 @@
 			   Bits acceptDocs,
 			   Map<Term,TermContext> termContexts) throws IOException {
 	return (Spans) new ClassSpans(
-	    this.highlight,
+	    this.operand,
 	    context,
 	    acceptDocs,
 	    termContexts,
@@ -79,12 +76,12 @@
     @Override
     public Query rewrite (IndexReader reader) throws IOException {
 	SpanClassQuery clone = null;
-	SpanQuery query = (SpanQuery) this.highlight.rewrite(reader);
+	SpanQuery query = (SpanQuery) this.operand.rewrite(reader);
 
-	if (query != this.highlight) {
+	if (query != this.operand) {
 	    if (clone == null)
 		clone = this.clone();
-	    clone.highlight = query;
+	    clone.operand = query;
 	};
 
 	if (clone != null)
@@ -96,7 +93,7 @@
     @Override
     public SpanClassQuery clone() {
 	SpanClassQuery spanClassQuery = new SpanClassQuery(
-	    (SpanQuery) this.highlight.clone(),
+	    (SpanQuery) this.operand.clone(),
 	    this.number
         );
 	spanClassQuery.setBoost(getBoost());
@@ -112,7 +109,7 @@
 	
 	final SpanClassQuery spanClassQuery = (SpanClassQuery) o;
 	
-	if (!highlight.equals(spanClassQuery.highlight)) return false;
+	if (!this.operand.equals(spanClassQuery.operand)) return false;
 
 	if (this.number != spanClassQuery.number) return false;
 
@@ -124,7 +121,7 @@
     @Override
     public int hashCode() {
 	int result = 1;
-	result = highlight.hashCode();
+	result = operand.hashCode();
 	result += (int) number;
 	result ^= (result << 15) | (result >>> 18);
 	result += Float.floatToRawIntBits(getBoost());
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanMatchModifyClassQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanMatchModifyClassQuery.java
index d507c07..b86b818 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanMatchModifyClassQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanMatchModifyClassQuery.java
@@ -24,21 +24,21 @@
 public class SpanMatchModifyClassQuery extends SpanClassQuery {
     private boolean divide = false;
 
-    public SpanMatchModifyClassQuery (SpanQuery highlight, byte number, boolean divide) {
-	super(highlight, number);
+    public SpanMatchModifyClassQuery (SpanQuery operand, byte number, boolean divide) {
+	super(operand, number);
 	this.divide = divide;
     };
 
-    public SpanMatchModifyClassQuery (SpanQuery highlight, boolean divide) {
-	this(highlight, (byte) 0, divide);
+    public SpanMatchModifyClassQuery (SpanQuery operand, boolean divide) {
+	this(operand, (byte) 1, divide);
     };
 
-    public SpanMatchModifyClassQuery (SpanQuery highlight, byte number) {
-	this(highlight, number, false);
+    public SpanMatchModifyClassQuery (SpanQuery operand, byte number) {
+	this(operand, number, false);
     };
 
-    public SpanMatchModifyClassQuery (SpanQuery highlight) {
-	this(highlight, (byte) 0, false);
+    public SpanMatchModifyClassQuery (SpanQuery operand) {
+	this(operand, (byte) 1, false);
     };
 
     @Override
@@ -50,8 +50,9 @@
 	else {
 	    buffer.append("shrink(");
 	};
-	buffer.append((int) this.number).append(": ");
-        buffer.append(this.highlight.toString());
+	short classNr = (short) this.number;
+	buffer.append(classNr & 0xFF).append(": ");
+        buffer.append(this.operand.toString());
 	buffer.append(')');
 
 	buffer.append(ToStringUtils.boost(getBoost()));
@@ -60,18 +61,18 @@
 
     @Override
     public Spans getSpans (final AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts) throws IOException {
-	return (Spans) new MatchModifyClassSpans(this.highlight, context, acceptDocs, termContexts, number, divide);
+	return (Spans) new MatchModifyClassSpans(this.operand, context, acceptDocs, termContexts, number, divide);
     };
 
     @Override
     public Query rewrite (IndexReader reader) throws IOException {
 	SpanMatchModifyClassQuery clone = null;
-	SpanQuery query = (SpanQuery) this.highlight.rewrite(reader);
+	SpanQuery query = (SpanQuery) this.operand.rewrite(reader);
 
-	if (query != this.highlight) {
+	if (query != this.operand) {
 	    if (clone == null)
 		clone = this.clone();
-	    clone.highlight = query;
+	    clone.operand = query;
 	};
 
 	if (clone != null)
@@ -83,7 +84,7 @@
     @Override
     public SpanMatchModifyClassQuery clone() {
 	SpanMatchModifyClassQuery spanMatchQuery = new SpanMatchModifyClassQuery(
-	    (SpanQuery) this.highlight.clone(),
+	    (SpanQuery) this.operand.clone(),
 	    this.number,
 	    this.divide
         );
@@ -100,7 +101,7 @@
 	
 	final SpanMatchModifyClassQuery spanMatchModifyClassQuery = (SpanMatchModifyClassQuery) o;
 	
-	if (!highlight.equals(spanMatchModifyClassQuery.highlight)) return false;
+	if (!this.operand.equals(spanMatchModifyClassQuery.operand)) return false;
 	if (this.number != spanMatchModifyClassQuery.number) return false;
 	if (this.divide != spanMatchModifyClassQuery.divide) return false;
 	return getBoost() == spanMatchModifyClassQuery.getBoost();
@@ -111,7 +112,7 @@
     @Override
     public int hashCode() {
 	int result = 1;
-	result = highlight.hashCode();
+	result = operand.hashCode();
 	result += number + 33_333;
 	result += divide ? 1 : 0;
 	result ^= (result << 15) | (result >>> 18);
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/ClassSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/ClassSpans.java
index cf12852..4b087cd 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/ClassSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/ClassSpans.java
@@ -24,7 +24,7 @@
     private List<byte[]> highlightedPayload;
     private final Spans spans;
     private byte number;
-    private SpanQuery highlight;
+    private SpanQuery operand;
     private Boolean hasmorespans = false;
 
     private ByteBuffer bb = ByteBuffer.allocate(9);
@@ -33,14 +33,14 @@
     // This advices the java compiler to ignore all loggings
     public static final boolean DEBUG = false;
 
-    public ClassSpans (SpanQuery highlight,
+    public ClassSpans (SpanQuery operand,
 		       AtomicReaderContext context,
 		       Bits acceptDocs,
 		       Map<Term,TermContext> termContexts,
 		       byte number) throws IOException {
-	spans = highlight.getSpans(context, acceptDocs, termContexts);
+	spans = operand.getSpans(context, acceptDocs, termContexts);
 	this.number = number;
-	this.highlight = highlight;
+	this.operand = operand;
 	this.highlightedPayload = new ArrayList<byte[]>(6);
     };
 
@@ -131,7 +131,7 @@
 
     @Override
     public String toString() {
-	return getClass().getName() + "(" + this.highlight.toString() + ")@" +
+	return getClass().getName() + "(" + this.operand.toString() + ")@" +
 	    (doc() + ":" + start() + "-" + end());
     };
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/MatchModifyClassSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/MatchModifyClassSpans.java
index a45e1ee..d6a6318 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/MatchModifyClassSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/MatchModifyClassSpans.java
@@ -37,7 +37,7 @@
     private final Logger log = LoggerFactory.getLogger(MatchModifyClassSpans.class);
 
     // This advices the java compiler to ignore all loggings
-    public static final boolean DEBUG = false;
+    public static final boolean DEBUG = true;
 
     private int start = -1, end;
     private int tempStart = 0, tempEnd = 0;
@@ -53,7 +53,7 @@
 	this.number    = number;
 	this.divide    = divide;
 	this.wrapQuery = wrapQuery;
-	this.bb        = ByteBuffer.allocate(9);
+	this.bb        = ByteBuffer.allocate(20);
 	this.wrappedPayload = new ArrayList<byte[]>(6);
     };
 
@@ -114,7 +114,7 @@
 		    if (payload.length == 9 && bb.get() == this.number) {
 			bb.rewind();
 			tempStart = bb.getInt();
-			tempEnd = bb.getInt();
+			tempEnd   = bb.getInt();
 
 			if (DEBUG)
 			    log.trace("Found matching class {}-{}", tempStart, tempEnd);
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanMatchModifyQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanMatchModifyQueryWrapper.java
index 7faadf8..bfdcdbf 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanMatchModifyQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanMatchModifyQueryWrapper.java
@@ -31,7 +31,7 @@
 
     public SpanMatchModifyQueryWrapper (SpanQueryWrapper subquery) {
 	this.subquery = subquery;
-	this.number = (byte) 0;
+	this.number = (byte) 1;
     };
 
     public SpanQuery toQuery () throws QueryException {
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java
index 8d0a05b..7368843 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java
@@ -97,18 +97,18 @@
 	assertEquals("totalResults", 3, kr.totalResults());
 	assertEquals("StartPos (0)", 1, kr.match(0).startPos);
 	assertEquals("EndPos (0)", 2, kr.match(0).endPos);
-	assertEquals("snippetBrackets (0)", "a[{b}]cabcab ...", kr.match(0).snippetBrackets());
+	assertEquals("snippetBrackets (0)", "a[{1:b}]cabcab ...", kr.match(0).snippetBrackets());
 	assertEquals("snippetHTML (0)", "<span class=\"context-left\">a</span><span class=\"match\">" +
-			"<em class=\"class-0 level-0\">b</em></span><span class=\"context-right\">cabcab<span " +
+			"<em class=\"class-1 level-0\">b</em></span><span class=\"context-right\">cabcab<span " +
 			"class=\"more\"></span></span>", kr.match(0).snippetHTML());
 
 	assertEquals("StartPos (1)", 4, kr.match(1).startPos);
 	assertEquals("EndPos (1)", 5, kr.match(1).endPos);
-	assertEquals("snippetBrackets (1)", "abca[{b}]cabac", kr.match(1).snippetBrackets());
+	assertEquals("snippetBrackets (1)", "abca[{1:b}]cabac", kr.match(1).snippetBrackets());
 	
 	assertEquals("StartPos (2)", 7, kr.match(2).startPos);
 	assertEquals("EndPos (2)", 8, kr.match(2).endPos);
-	assertEquals("snippetBrackets (2)", "... bcabca[{b}]ac", kr.match(2).snippetBrackets());
+	assertEquals("snippetBrackets (2)", "... bcabca[{1:b}]ac", kr.match(2).snippetBrackets());
 
 
 	sq = new SpanNextQuery(
@@ -167,20 +167,20 @@
 	// System.err.println(kr.toJSON());
 
 	assertEquals("totalResults", 1, kr.totalResults());
-	assertEquals("SnippetBrackets (0)", "abcabc[a{2:b{a}}]c", kr.match(0).snippetBrackets());
-	assertEquals("SnippetHTML (0)", "<span class=\"context-left\">abcabc</span><span class=\"match\">a<em class=\"class-2 level-0\">b<em class=\"class-0 level-1\">a</em></em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetBrackets (0)", "abcabc[a{2:b{1:a}}]c", kr.match(0).snippetBrackets());
+	assertEquals("SnippetHTML (0)", "<span class=\"context-left\">abcabc</span><span class=\"match\">a<em class=\"class-2 level-0\">b<em class=\"class-1 level-1\">a</em></em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
 
 	// Offset tokens
 	kr = ki.search(sq, 0, (short) 10, true, (short) 2, true, (short) 2);
 	assertEquals("totalResults", 1, kr.totalResults());
-	assertEquals("SnippetBrackets (0)", "... bc[a{2:b{a}}]c", kr.match(0).snippetBrackets());
-	assertEquals("SnippetHTML (0)", "<span class=\"context-left\"><span class=\"more\"></span>bc</span><span class=\"match\">a<em class=\"class-2 level-0\">b<em class=\"class-0 level-1\">a</em></em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetBrackets (0)", "... bc[a{2:b{1:a}}]c", kr.match(0).snippetBrackets());
+	assertEquals("SnippetHTML (0)", "<span class=\"context-left\"><span class=\"more\"></span>bc</span><span class=\"match\">a<em class=\"class-2 level-0\">b<em class=\"class-1 level-1\">a</em></em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
 
 	// Offset Characters
 	kr = ki.search(sq, 0, (short) 10, false, (short) 2, false, (short) 2);
 	assertEquals("totalResults", 1, kr.totalResults());
-	assertEquals("SnippetBrackets (0)", "... bc[a{2:b{a}}]c", kr.match(0).snippetBrackets());
-	assertEquals("SnippetHTML (0)", "<span class=\"context-left\"><span class=\"more\"></span>bc</span><span class=\"match\">a<em class=\"class-2 level-0\">b<em class=\"class-0 level-1\">a</em></em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetBrackets (0)", "... bc[a{2:b{1:a}}]c", kr.match(0).snippetBrackets());
+	assertEquals("SnippetHTML (0)", "<span class=\"context-left\"><span class=\"more\"></span>bc</span><span class=\"match\">a<em class=\"class-2 level-0\">b<em class=\"class-1 level-1\">a</em></em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
 
 
 	// System.err.println(kr.toJSON());
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java b/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java
index 347f4ee..3acc821 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java
@@ -101,8 +101,8 @@
 
 	KorapMatch km = kr.match(0);
 
-	assertEquals("SnippetBrackets (0)", "... bcabca[{2:b{a}}]c", km.snippetBrackets());
-	assertEquals("ID (0)", "match-c1!d1-p7-9(2)7-8(0)8-8", km.getID());
+	assertEquals("SnippetBrackets (0)", "... bcabca[{2:b{1:a}}]c", km.snippetBrackets());
+	assertEquals("ID (0)", "match-c1!d1-p7-9(2)7-8(1)8-8", km.getID());
     };
 
     @Test
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
index 529b74a..fb8850d 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
@@ -71,9 +71,9 @@
 	assertEquals("totalResults", 1, kr.totalResults());
 	assertEquals("StartPos (0)", 7, kr.match(0).startPos);
 	assertEquals("EndPos (0)", 9, kr.match(0).endPos);
-	assertEquals("SnippetBrackets (0)", "... bcabca[b{a}]c", kr.match(0).snippetBrackets());
+	assertEquals("SnippetBrackets (0)", "... bcabca[b{1:a}]c", kr.match(0).snippetBrackets());
 
-	assertEquals("Test no 'more' context", "<span class=\"context-left\"><span class=\"more\"></span>bcabca</span><span class=\"match\">b<em class=\"class-0 level-0\">a</em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
+	assertEquals("Test no 'more' context", "<span class=\"context-left\"><span class=\"more\"></span>bcabca</span><span class=\"match\">b<em class=\"class-1 level-0\">a</em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
 	sq = new SpanMatchModifyClassQuery(
   	     new SpanNextQuery(
                 new SpanTermQuery(new Term("base", "s:b")),
@@ -133,23 +133,23 @@
 	// System.err.println(kr.toJSON());
 
 	assertEquals("totalResults", 1, kr.totalResults());
-	assertEquals("SnippetBrackets (0)", "... bcabca[b{a}]c", kr.match(0).snippetBrackets());
+	assertEquals("SnippetBrackets (0)", "... bcabca[b{1:a}]c", kr.match(0).snippetBrackets());
 
-	assertEquals("SnippetHTML (0) 1", "<span class=\"context-left\"><span class=\"more\"></span>bcabca</span><span class=\"match\">b<em class=\"class-0 level-0\">a</em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetHTML (0) 1", "<span class=\"context-left\"><span class=\"more\"></span>bcabca</span><span class=\"match\">b<em class=\"class-1 level-0\">a</em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
 
 	// Offset tokens
 	kr = ki.search(sq, 0, (short) 10, true, (short) 2, true, (short) 2);
 	assertEquals("totalResults", 1, kr.totalResults());
-	assertEquals("SnippetBrackets (0)", "... ca[b{a}]c", kr.match(0).snippetBrackets());
+	assertEquals("SnippetBrackets (0)", "... ca[b{1:a}]c", kr.match(0).snippetBrackets());
 
 
 
 	// Offset Characters
 	kr = ki.search(sq, 0, (short) 10, false, (short) 1, false, (short) 0);
 	assertEquals("totalResults", 1, kr.totalResults());
-	assertEquals("SnippetBrackets (0)", "... a[b{a}] ...", kr.match(0).snippetBrackets());
+	assertEquals("SnippetBrackets (0)", "... a[b{1:a}] ...", kr.match(0).snippetBrackets());
 
-	assertEquals("SnippetHTML (0) 2", "<span class=\"context-left\"><span class=\"more\"></span>a</span><span class=\"match\">b<em class=\"class-0 level-0\">a</em></span><span class=\"context-right\"><span class=\"more\"></span></span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetHTML (0) 2", "<span class=\"context-left\"><span class=\"more\"></span>a</span><span class=\"match\">b<em class=\"class-1 level-0\">a</em></span><span class=\"context-right\"><span class=\"more\"></span></span>", kr.match(0).snippetHTML());
 
 	sq = new SpanMatchModifyClassQuery(
             new SpanClassQuery(
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKorapQuery.java b/src/test/java/de/ids_mannheim/korap/query/TestKorapQuery.java
index 2eaa1cd..c5fd542 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestKorapQuery.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKorapQuery.java
@@ -113,21 +113,21 @@
     public void KorapClassQuery2 () throws QueryException {
 	KorapQuery kq = new KorapQuery("field");
 	SpanQuery sq = kq._(kq.seg("base:test")).toQuery();
-	assertEquals("{0: field:base:test}", sq.toString());
+	assertEquals("{1: field:base:test}", sq.toString());
     };
 
     @Test
     public void KorapClassQuery3 () throws QueryException {
 	KorapQuery kq = new KorapQuery("field");
 	SpanQuery sq = kq.seq(kq.seg("tree"), kq.contains(kq.tag("s"), kq._(kq.tag("np"))), kq.re("hey.*")).toQuery();
-	assertEquals("spanNext(spanNext(field:tree, spanContain(<field:s />, {0: <field:np />})), SpanMultiTermQueryWrapper(field:/hey.*/))", sq.toString());
+	assertEquals("spanNext(spanNext(field:tree, spanContain(<field:s />, {1: <field:np />})), SpanMultiTermQueryWrapper(field:/hey.*/))", sq.toString());
     };
 
     @Test
     public void KorapShrinkQuery () throws QueryException {
 	KorapQuery kq = new KorapQuery("field");
 	SpanQuery sq = kq.shrink(kq.tag("np")).toQuery();
-	assertEquals("shrink(0: <field:np />)", sq.toString());
+	assertEquals("shrink(1: <field:np />)", sq.toString());
     };
 
     @Test
@@ -148,7 +148,7 @@
     public void KorapShrinkQuery3 () throws QueryException {
 	KorapQuery kq = new KorapQuery("field");
 	SpanQuery sq = kq.shrink(1, kq._(1, kq.seq(kq.tag("np"), kq._(kq.seg("test").without("no"))))).toQuery();
-	assertEquals("shrink(1: {1: spanNext(<field:np />, {0: spanNot(field:test, field:no, 0, 0)})})", sq.toString());
+	assertEquals("shrink(1: {1: spanNext(<field:np />, {1: spanNot(field:test, field:no, 0, 0)})})", sq.toString());
     };
 
     @Test
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
index c0ad9d9..41cac0f 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
@@ -52,7 +52,7 @@
 	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp3.jsonld").getFile());
 
 	// shrink({[base=Mann]})
-	assertEquals(sqwi.toQuery().toString(), "shrink(0: {0: tokens:mate/l:Mann})");
+	assertEquals(sqwi.toQuery().toString(), "shrink(1: {1: tokens:mate/l:Mann})");
     };
 
     @Test
@@ -60,7 +60,7 @@
 	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp4.jsonld").getFile());
 
 	// shrink({[base=foo]}[orth=bar])
-	assertEquals(sqwi.toQuery().toString(), "shrink(0: spanNext({0: tokens:mate/l:foo}, tokens:s:bar))");
+	assertEquals(sqwi.toQuery().toString(), "shrink(1: spanNext({1: tokens:mate/l:foo}, tokens:s:bar))");
     };
 
     @Test
@@ -194,7 +194,7 @@
 	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp-class.jsonld").getFile());
 
 	// within(<np>,[base=Mann])
-	assertEquals(sqwi.toQuery().toString(), "{0: spanNext(tokens:tt/p:ADJA, tokens:mate/p:NN)}");
+	assertEquals(sqwi.toQuery().toString(), "{1: spanNext(tokens:tt/p:ADJA, tokens:mate/p:NN)}");
     };
     
     @Test
@@ -277,6 +277,16 @@
 	assertEquals(sqwi.toQuery().toString(), "spanDistance(tokens:s:Tal, tokens:s:Wald, [(w[2:100], ordered, notExcluded)])");
     };
 
+    @Test
+    public void queryJSONcosmasBoundaryBug () throws QueryException {
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bugs/cosmas_boundary.jsonld").getFile());
+
+	// Namen /s1 Leben
+	assertEquals(sqwi.toQuery().toString(), "shrink(129: spanElementDistance({129: tokens:s:Namen}, {129: tokens:s:Leben}, [(base/s:s[0:1], notOrdered, notExcluded)]))");
+    };
+
+
+
     public static String getString (String path) {
 	StringBuilder contentBuilder = new StringBuilder();
 	try {
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestKorapSearch.java b/src/test/java/de/ids_mannheim/korap/search/TestKorapSearch.java
index 4fd0c21..8180a23 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestKorapSearch.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestKorapSearch.java
@@ -3,6 +3,8 @@
 import java.util.*;
 import java.io.*;
 
+import static de.ids_mannheim.korap.TestSimple.*;
+
 import de.ids_mannheim.korap.KorapSearch;
 import de.ids_mannheim.korap.KorapCollection;
 import de.ids_mannheim.korap.KorapQuery;
@@ -604,6 +606,42 @@
     };
 
     @Test
+    public void searchJSONcosmasBoundaryBug () throws IOException {
+	// Construct index
+	KorapIndex ki = new KorapIndex();
+	// Indexing test files
+	FieldDocument fd = ki.addDocFile(
+            1,getClass().getResource("/bzk/D59-00089.json.gz").getFile(), true
+	);
+	ki.commit();
+
+	String json = getString(
+	    getClass().getResource("/queries/bugs/cosmas_boundary.jsonld").getFile()
+        );
+
+	KorapQuery kq = new KorapQuery("tokens");
+
+	// Check with 129
+	KorapSearch ks = new KorapSearch(
+	    kq.shrink(1,kq.contains(kq.tag("base/s:s"), kq._(1, kq.seg("s:Leben"))))
+	);
+
+	KorapResult kr = ks.run(ki);
+	System.err.println(kr.getMatch(0).getSnippetBrackets());
+
+	/*
+
+	ks = new KorapSearch(json);
+
+	kr = ks.run(ki);
+	System.err.println(kr.toJSON());
+	assertEquals(276, kr.getTotalResults());
+	assertEquals(0, kr.getStartIndex());
+	assertEquals(10, kr.getItemsPerPage());
+	*/
+    };
+
+    @Test
     public void searchJSONCollection () throws IOException {
 
 	// Construct index
@@ -622,7 +660,9 @@
 	};
 	ki.commit();
 
-	String json = getString(getClass().getResource("/queries/metaquery8-nocollection.jsonld").getFile());
+	String json = getString(
+            getClass().getResource("/queries/metaquery8-nocollection.jsonld").getFile()
+        );
 	
 	KorapSearch ks = new KorapSearch(json);
 	KorapResult kr = ks.run(ki);
@@ -910,8 +950,6 @@
 	assertEquals(11, map.size());
     };
 
-
-
     public static String getString (String path) {
 	StringBuilder contentBuilder = new StringBuilder();
 	try {
diff --git a/src/test/resources/queries/bsp3.jsonld b/src/test/resources/queries/bsp3.jsonld
index 1a40038..0e76838 100644
--- a/src/test/resources/queries/bsp3.jsonld
+++ b/src/test/resources/queries/bsp3.jsonld
@@ -103,12 +103,12 @@
   "query": {
     "@type": "korap:group", 
     "operation": "operation:submatch", 
-    "classRef": [0],
+    "classRef": [1],
     "operands": [
       {
         "@type": "korap:group", 
         "operation" : "operation:class",
-        "class": 0, 
+        "class": 1, 
         "operands": [
           {
             "@type": "korap:token", 
diff --git a/src/test/resources/queries/bsp4.jsonld b/src/test/resources/queries/bsp4.jsonld
index c5cc7db..3a0c3c4 100644
--- a/src/test/resources/queries/bsp4.jsonld
+++ b/src/test/resources/queries/bsp4.jsonld
@@ -103,7 +103,7 @@
   "query": {
     "@type": "korap:group", 
     "operation": "operation:submatch", 
-    "classRef": [0],
+    "classRef": [1],
     "operands": [
       {
         "@type": "korap:group", 
@@ -112,7 +112,7 @@
           {
             "@type": "korap:group", 
 	    "operation":"operation:class",
-            "class": 0, 
+            "class": 1, 
             "operands": [
               {
                 "@type": "korap:token", 
diff --git a/src/test/resources/queries/bugs/cosmas_boundary.jsonld b/src/test/resources/queries/bugs/cosmas_boundary.jsonld
new file mode 100644
index 0000000..fb0f5ff
--- /dev/null
+++ b/src/test/resources/queries/bugs/cosmas_boundary.jsonld
@@ -0,0 +1,69 @@
+{
+  "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+  "query":{
+    "@type" : "korap:reference",
+    "classRef" : [
+      129
+    ],
+    "operands" : [
+      {
+        "@type" : "korap:group",
+        "distances" : [
+          {
+            "@type" : "cosmas:distance",
+            "boundary" : {
+              "@type" : "korap:boundary",
+              "max" : 1,
+              "min" : 0
+            },
+	    "foundry" : "base",
+	    "layer" : "s",
+            "key" : "s",
+
+            "max" : 1,
+            "min" : 0
+          }
+        ],
+        "inOrder" : false,
+        "operands" : [
+          {
+            "@type" : "korap:group",
+            "class" : 129,
+            "classOut" : 129,
+            "operands" : [
+              {
+                "@type" : "korap:token",
+                "wrap" : {
+                  "@type" : "korap:term",
+                  "key" : "Namen",
+                  "layer" : "orth",
+                  "match" : "match:eq"
+                }
+              }
+            ],
+            "operation" : "operation:class"
+          },
+          {
+            "@type" : "korap:group",
+            "class" : 129,
+            "classOut" : 129,
+            "operands" : [
+              {
+                "@type" : "korap:token",
+                "wrap" : {
+                  "@type" : "korap:term",
+                  "key" : "Leben",
+                  "layer" : "orth",
+                  "match" : "match:eq"
+                }
+              }
+            ],
+            "operation" : "operation:class"
+          }
+        ],
+        "operation" : "operation:sequence"
+      }
+    ],
+    "operation" : "operation:focus"
+  }
+}
