Fix comparison contract bug (not tested)
diff --git a/src/main/java/de/ids_mannheim/korap/KorapMatch.java b/src/main/java/de/ids_mannheim/korap/KorapMatch.java
index 0e81695..993912c 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapMatch.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapMatch.java
@@ -770,8 +770,12 @@
 	    }
 	    else if (arg0[0] == arg1[0]) {
 		// Check endpositions
-		if (arg0[1] > arg1[1])
+		if (arg0[1] > arg1[1]) {
 		    return -1;
+		}
+		else if (arg0[1] == arg1[1]) {
+		    return 0;
+		}
 		return 1;
 	    };
 	    return -1;
@@ -790,8 +794,12 @@
 	    }
 	    else if (arg0[1] == arg1[1]) {
 		// Check start positions
-		if (arg0[0] < arg1[0])
+		if (arg0[0] < arg1[0]) {
 		    return 1;
+		}
+		else if (arg0[0] == arg1[0]) {
+		    return 0;
+		};
 		return -1;
 	    };
 	    return -1;
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java b/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
index a2a3c72..6eaf44c 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
@@ -177,7 +177,6 @@
 
 	// Start creating query
 	/*
-
 	ks = new KorapSearch(kq.tag("xip/c:NPA"));
 	ks.setCount(1);
 	ks.setCutOff(true);