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"
+  }
+}
