limit focus classRef to 127
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusTree.java
index e1092e5..32f5918 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusTree.java
@@ -334,6 +334,12 @@
 					} else {
 						try {
 							int classRef = Integer.parseInt(ref);
+							// only allow class id up to 127
+							if (classRef > 127) {
+								addWarning("Only class references up to 127 are allowed. Your reference to class "+classRef+" has been set back to 127. "
+										+ "Check for possible conflict with other classes.");
+								classRef = 127;
+							}
 							classRefs.add(classRef);
 						} catch (NumberFormatException e) {
 							String err = "The specified class reference in the " +
diff --git a/src/test/java/PoliqarpPlusTreeTest.java b/src/test/java/PoliqarpPlusTreeTest.java
index 1388dcd..8abb911 100644
--- a/src/test/java/PoliqarpPlusTreeTest.java
+++ b/src/test/java/PoliqarpPlusTreeTest.java
@@ -21,10 +21,6 @@
  */
 public class PoliqarpPlusTreeTest {
 
-	String map;
-	String expected;
-	String metaExpected;
-	String metaMap;
 	String query;
 	ArrayList<JsonNode> operands;