diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/AbstractSyntaxTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/AbstractSyntaxTree.java
index 7b1b01e..ed58e7d 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/AbstractSyntaxTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/AbstractSyntaxTree.java
@@ -122,11 +122,13 @@
 		return group;
 	}
 	
-	protected LinkedHashMap<String, Object> makeRepetition(int min, int max) {
+	protected LinkedHashMap<String, Object> makeRepetition(Integer min, Integer max) {
 		LinkedHashMap<String, Object> group = makeGroup("repetition");
 		group.put("boundary", makeBoundary(min, max));
 		group.put("min", min);
-		group.put("max", max);
+		if (max != null) {
+			group.put("max", max);
+		}
 		announcements.add("Deprecated 2014-07-24: 'min' and 'max' to be supported until 6 months from deprecation date.");
 		return group;
 	}
@@ -163,21 +165,25 @@
 		return group;
 	}
 	
-	protected LinkedHashMap<String, Object> makeBoundary(int min, int max) {
+	protected LinkedHashMap<String, Object> makeBoundary(Integer min, Integer max) {
 		LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
 		group.put("@type", "korap:boundary");
 		group.put("min", min);
-		group.put("max", max);
+		if (max != null) {
+			group.put("max", max);
+		}
 		return group;
 	}
 
-	protected LinkedHashMap<String, Object> makeDistance(String key, int min, int max) {
+	protected LinkedHashMap<String, Object> makeDistance(String key, Integer min, Integer max) {
 		LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
 		group.put("@type", "korap:distance");
 		group.put("key", key);
 		group.put("boundary", makeBoundary(min, max));
 		group.put("min", min);
-		group.put("max", max);
+		if (max != null) {
+			group.put("max", max);
+		}
 		announcements.add("Deprecated 2014-07-24: 'min' and 'max' to be supported until 6 months from deprecation date.");
 		return group;
 	}
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/AqlTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/AqlTree.java
index 51e5d6e..61c0f23 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/AqlTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/AqlTree.java
@@ -1,5 +1,7 @@
 package de.ids_mannheim.korap.query.serialize;
 
+import static org.junit.Assert.assertEquals;
+
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -486,7 +488,7 @@
 			ParseTree star = getFirstChildWithCat(operatorNode, "*");
 			ArrayList<Object> distances = new ArrayList<Object>();
 			if (star != null) {
-				distances.add(makeDistance("w", 0, 100));
+				distances.add(makeDistance("w", 0, null));
 				relation.put("distances", distances);
 			}
 			if (rangeSpec != null) {
@@ -573,23 +575,15 @@
 	private LinkedHashMap<String, Object> boundaryFromRangeSpec(ParseTree rangeSpec, boolean expandToMax) {
 		Integer min = Integer.parseInt(rangeSpec.getChild(0).toStringTree(parser));
 		Integer max = min;
-		if (expandToMax) max = MAXIMUM_DISTANCE;
+		if (expandToMax) max = null;
 		if (rangeSpec.getChildCount()==3) 
 			max = Integer.parseInt(rangeSpec.getChild(2).toStringTree(parser));
 		return makeBoundary(min, max);
 	}
 
-	private LinkedHashMap<String, Object> distanceFromRangeSpec(String key, ParseTree rangeSpec) {
-		Integer min = Integer.parseInt(rangeSpec.getChild(0).toStringTree(parser));
-		Integer max = MAXIMUM_DISTANCE;
-		if (rangeSpec.getChildCount()==3) 
-			max = Integer.parseInt(rangeSpec.getChild(2).toStringTree(parser));
-		return makeDistance(key, min, max);
-	}
-
 	private LinkedHashMap<String, Object> parseDistance(ParseTree rangeSpec) {
 		Integer min = Integer.parseInt(rangeSpec.getChild(0).toStringTree(parser));
-		Integer max = MAXIMUM_DISTANCE;
+		Integer max = null;
 		if (rangeSpec.getChildCount()==3) 
 			max = Integer.parseInt(rangeSpec.getChild(2).toStringTree(parser));
 		return makeDistance("w", min, max);
@@ -697,7 +691,8 @@
 				"lemma=\"Haus\"",
 				"Katze=\"Hund\"",
 				"cnx/c=\"NP\"",
-				"cat=\"NP\""
+				"cat=\"NP\"",
+				 "node & node & #1 .+ #2"
 		};
 		//		AqlTree.verbose=true;
 		for (String q : queries) {
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 0a1db9a..0c82659 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
@@ -19,7 +19,7 @@
  */
 public class PoliqarpPlusTree extends Antlr4AbstractSyntaxTree {
 
-	Logger log = LoggerFactory.getLogger(PoliqarpPlusTree.class);
+	private static Logger log = LoggerFactory.getLogger(PoliqarpPlusTree.class);
 
 	/**
 	 * Most centrally, this class maintains a set of nested maps and lists which represent the JSON tree, which is built by the JSON serialiser
@@ -37,17 +37,11 @@
 	}
 
 	@Override
-	public Map<String, Object> getRequestMap() {
-		return requestMap;
-	}
-
-	@Override
 	public void process(String query) throws QueryException {
 		ParseTree tree;
 		tree = parsePoliqarpQuery(query);
 		super.parser = this.parser;
 		log.info("Processing PoliqarpPlus");
-		requestMap.put("@context", "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld");
 		processNode(tree);
 	}
 
@@ -96,7 +90,7 @@
 				quantGroup.put("boundary", makeBoundary(minmax[0], minmax[1]));
 				if (minmax[0] != null) quantGroup.put("min", minmax[0]);
 				if (minmax[1] != null) quantGroup.put("max", minmax[1]);
-				warningMsgs.add("Deprecated 2014-07-24: 'min' and 'max' to be supported until 6 months from deprecation date.");
+				announcements.add("Deprecated 2014-07-24: 'min' and 'max' to be supported until 6 months from deprecation date.");
 				putIntoSuperObject(quantGroup);
 				objectStack.push(quantGroup);
 				stackedObjects++;
@@ -107,7 +101,7 @@
 			LinkedHashMap<String,Object> sequence = makeGroup("sequence");
 			ParseTree distanceNode = getFirstChildWithCat(node, "distance");
 			if (distanceNode!=null) {
-				int[] minmax = parseDistance(distanceNode);
+				Integer[] minmax = parseDistance(distanceNode);
 				LinkedHashMap<String,Object> distance = makeDistance("w", minmax[0], minmax[1]);
 				sequence.put("inOrder", true);
 				ArrayList<Object> distances = new ArrayList<Object>();
@@ -121,10 +115,10 @@
 		}
 		
 		if (nodeCat.equals("emptyTokenSequence")) {
-			int[] minmax = parseEmptySegments(node);
+			Integer[] minmax = parseEmptySegments(node);
 			LinkedHashMap<String,Object> object;
 			LinkedHashMap<String,Object> emptyToken = makeToken();
-			if (minmax[0] != 1 || minmax[1] != 1) {
+			if (minmax[0] != 1 || minmax[1] == null || minmax[1] != 1) {
 				object = makeRepetition(minmax[0], minmax[1]);
 				((ArrayList<Object>) object.get("operands")).add(emptyToken);
 			} else {
@@ -356,7 +350,8 @@
 	 * element representing the maximal number of repetitions 
 	 */
 	private Integer[] parseRepetition(ParseTree node) {
-		int min = 0, max = 0;
+		Integer min = 0, max = 0;
+		boolean maxInfinite = false;
 		// (repetition) node can be of two types: 'kleene' or 'range'
 		ParseTree repetitionTypeNode = node.getChild(0);
 		String repetitionType = getNodeCat(repetitionTypeNode);
@@ -364,10 +359,10 @@
 			// kleene operators (+ and *) as well as optionality (?)
 			String kleeneOp = repetitionTypeNode.getText();
 			if (kleeneOp.equals("*")) {
-				max = MAXIMUM_DISTANCE;
+				maxInfinite = true;
 			} else if (kleeneOp.equals("+")) {
 				min = 1;
-				max = MAXIMUM_DISTANCE;
+				maxInfinite = true;
 			} if (kleeneOp.equals("?")) {
 				max = 1;
 			}
@@ -376,12 +371,15 @@
 			ParseTree minNode = getFirstChildWithCat(repetitionTypeNode, "min");
 			ParseTree maxNode = getFirstChildWithCat(repetitionTypeNode, "max");
 			if (maxNode!=null) max = Integer.parseInt(maxNode.getText());
-			else max = MAXIMUM_DISTANCE;
+			else maxInfinite = true;
 			// min is optional: if not specified, min = max
 			if (minNode!=null) min = Integer.parseInt(minNode.getText());
 			else if (hasChild(repetitionTypeNode, ",")) min = 0;
 			else min = max;
 		}
+		if (maxInfinite) {
+			max = null;
+		}
 		return new Integer[]{min,max};
 	}
 
@@ -516,16 +514,18 @@
 	 * @param distanceNode
 	 * @return
 	 */
-	private int[] parseDistance(ParseTree distanceNode) {
-		int[] minmax = parseEmptySegments(distanceNode.getChild(0));
+	private Integer[] parseDistance(ParseTree distanceNode) {
+		Integer[] minmax = parseEmptySegments(distanceNode.getChild(0));
 		Integer min = minmax[0];
 		Integer max = minmax[1];
-		min = cropToMaxValue(min+1);
-		max = cropToMaxValue(max+1);
-		return new int[]{min, max};
+		min++;
+		if (max != null) max++;
+//		min = cropToMaxValue(min);
+//		max = cropToMaxValue(max);
+		return new Integer[]{min, max};
 	}
 	
-	private int[] parseEmptySegments(ParseTree emptySegments) {
+	private Integer[] parseEmptySegments(ParseTree emptySegments) {
 		Integer min = 0;
 		Integer max = 0;
 		ParseTree child;
@@ -536,16 +536,20 @@
 				if (nextSibling != null && getNodeCat(nextSibling).equals("repetition")) {
 					Integer[] minmax = parseRepetition(nextSibling);
 					min += minmax[0];
-					max += minmax[1];
+					if (minmax[1] != null) {
+						max += minmax[1];
+					} else {
+						max = null;
+					}
 				} else {
 					min++;
 					max++;
 				}
 			}
 		}
-		min = cropToMaxValue(min);
-		max = cropToMaxValue(max);
-		return new int[]{min, max};
+//		min = cropToMaxValue(min);
+//		max = cropToMaxValue(max);
+		return new Integer[]{min, max};
 	}
 
 	/**
@@ -558,8 +562,8 @@
 			number = MAXIMUM_DISTANCE; 
 			String warning = String.format("You specified a distance between two segments that is greater than " +
 					"the allowed max value of %d. Your query will be re-interpreted using a distance of %d.", MAXIMUM_DISTANCE, MAXIMUM_DISTANCE);
-			warningMsgs.add(warning);
-			log.warn(warning);
+			warnings.add(warning);
+			log.warn("User warning: "+warning);
 		}
 		return number;
 	}
@@ -608,20 +612,21 @@
 //				"Der \"Baum\"/x",
 //				"contains(<vp>,[][base=foo])",
 //				"[hallo=welt]*",
-				"schland/x",
-				"focus([orth=Der]{[orth=Mann]})",
-				"shrink([orth=Der]{[orth=Mann]})",
-				"[mate/m=number:sg]",
-				"z.B./x",
-				"\".*?Mann.\"",
-				"\".*?Mann.*?\"",
-				"[orth=\".*?l(au|ie)fen.*?*\"]",
-				"[orth=Mann][][orth=Mann]",
-				"startswith(<s>, [][base=Mann])",
-				"[base=der][]{1,102}[base=Mann]",
-				"[base=geht][base=der][]*[base=Mann]",
-				"<cnx/c=vp (class=header&id=7)>",
-				"<cnx/c=vp class=header&id=a>"
+//				"schland/x",
+//				"focus([orth=Der]{[orth=Mann]})",
+//				"shrink([orth=Der]{[orth=Mann]})",
+//				"[mate/m=number:sg]",
+//				"z.B./x",
+//				"\".*?Mann.\"",
+//				"\".*?Mann.*?\"",
+//				"[orth=\".*?l(au|ie)fen.*?*\"]",
+//				"[orth=Mann][][orth=Mann]",
+//				"startswith(<s>, [][base=Mann])",
+//				"[base=der][]{1,102}[base=Mann]",
+//				"[base=geht][base=der][]*[base=Mann]",
+//				"<cnx/c=vp (class=header&id=7)>",
+//				"<cnx/c=vp class=header&id=a>",
+				"[][]*[base=Mann]"
 		};
 //		PoliqarpPlusTree.verbose=true;
 		for (String q : queries) {
diff --git a/src/test/java/AqlTreeTest.java b/src/test/java/AqlTreeTest.java
index d2f5cdc..44a8a5c 100644
--- a/src/test/java/AqlTreeTest.java
+++ b/src/test/java/AqlTreeTest.java
@@ -273,7 +273,7 @@
 						"{@type=korap:span}," +
 						"{@type=korap:span}" +
 					"], distances=[" +
-						"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=0, max=100}, min=0, max=100}" +
+						"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=0}, min=0}" +
 					"], inOrder=true" +
 				"}";
 		aqlt = new AqlTree(query);
diff --git a/src/test/java/PoliqarpPlusTreeTest.java b/src/test/java/PoliqarpPlusTreeTest.java
index d69030c..491e573 100644
--- a/src/test/java/PoliqarpPlusTreeTest.java
+++ b/src/test/java/PoliqarpPlusTreeTest.java
@@ -306,7 +306,7 @@
 				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=der, match=match:eq}}," +
 				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
 			"], inOrder=true, distances=[" +
-				"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1, max=100}, min=1, max=100}" +
+				"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1}, min=1}" +
 			"]}";
 		ppt = new PoliqarpPlusTree("[base=der][]*[base=Mann]");
 		map = ppt.getRequestMap().get("query").toString();
@@ -319,7 +319,7 @@
 				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=der, match=match:eq}}," +
 				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
 			"], inOrder=true, distances=[" +
-				"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=2, max=100}, min=2, max=100}" +
+				"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=2}, min=2}" +
 			"]}";
 		ppt = new PoliqarpPlusTree("[base=der][]+[base=Mann]");
 		map = ppt.getRequestMap().get("query").toString();
@@ -332,7 +332,7 @@
 				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=der, match=match:eq}}," +
 				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
 			"], inOrder=true, distances=[" +
-				"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=2, max=100}, min=2, max=100}" +
+				"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=2, max=103}, min=2, max=103}" +
 			"]}";
 		ppt = new PoliqarpPlusTree("[base=der][]{1,102}[base=Mann]");
 		map = ppt.getRequestMap().get("query").toString();
@@ -347,7 +347,7 @@
 					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=der, match=match:eq}}," +
 					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
 				"], inOrder=true, distances=[" +
-					"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1, max=100}, min=1, max=100}" +
+					"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1}, min=1}" +
 				"]}" +
 			"]}";
 		ppt = new PoliqarpPlusTree("[base=geht][base=der][]*[base=Mann]");
@@ -366,7 +366,7 @@
 						"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=da, match=match:eq}}" +
 					"]}" +
 				"], inOrder=true, distances=[" +
-					"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1, max=100}, min=1, max=100}" +
+					"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1}, min=1}" +
 				"]}" +
 			"]}";
 		ppt = new PoliqarpPlusTree(query);
@@ -385,7 +385,7 @@
 					  "{@type=korap:span, key=np}" +
 					"]}" +
 				"], inOrder=true, distances=[" +
-					"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1, max=100}, min=1, max=100}" +
+					"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1}, min=1}" +
 				"]}" +
 			"]}";
 		ppt = new PoliqarpPlusTree(query);
@@ -435,7 +435,7 @@
 				"{@type=korap:group, operation=operation:sequence, operands=[" +
 					"{@type=korap:group, operation=operation:repetition, operands=[" +
 						"{@type=korap:token}" +
-					"], boundary={@type=korap:boundary, min=1, max=100}, min=1, max=100}," +
+					"], boundary={@type=korap:boundary, min=1}, min=1}," +
 					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
 				"]}";
 		ppt = new PoliqarpPlusTree(query);
@@ -447,7 +447,7 @@
 				"{@type=korap:group, operation=operation:sequence, operands=[" +
 					"{@type=korap:group, operation=operation:repetition, operands=[" +
 						"{@type=korap:token}" +
-					"], boundary={@type=korap:boundary, min=1, max=100}, min=1, max=100}," +
+					"], boundary={@type=korap:boundary, min=1}, min=1}," +
 					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}," +
 					"{@type=korap:group, operation=operation:repetition, operands=[" +
 						"{@type=korap:token}" +
@@ -462,7 +462,7 @@
 				"{@type=korap:group, operation=operation:sequence, operands=[" +
 					"{@type=korap:group, operation=operation:repetition, operands=[" +
 						"{@type=korap:token}" +
-					"], boundary={@type=korap:boundary, min=1, max=100}, min=1, max=100}," +
+					"], boundary={@type=korap:boundary, min=1}, min=1}," +
 					"{@type=korap:group, operation=operation:position, frame=frame:contains, operands=[" +
 					  "{@type=korap:span, key=s}," +
 					  "{@type=korap:span, key=np}" +
@@ -520,7 +520,7 @@
 		// [base=foo]*
 		String occ1 = "{@type=korap:group, operation=operation:repetition, operands=[" +
 					     "{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=foo, match=match:eq}}" +
-					  "], boundary={@type=korap:boundary, min=0, max=100}, min=0, max=100}"; 
+					  "], boundary={@type=korap:boundary, min=0}, min=0}"; 
 		ppt = new PoliqarpPlusTree("[base=foo]*");
 		map = ppt.getRequestMap().get("query").toString();
 		assertEquals(occ1.replaceAll(" ", ""), map.replaceAll(" ", ""));
@@ -530,7 +530,7 @@
 				"{@type=korap:group, operation=operation:sequence, operands=[" +
 					"{@type=korap:group, operation=operation:repetition, operands=[" +
 					     "{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=foo, match=match:eq}}" +
-					"], boundary={@type=korap:boundary, min=0, max=100}, min=0, max=100 }," +
+					"], boundary={@type=korap:boundary, min=0}, min=0 }," +
 					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=bar, match=match:eq}}" +
 				"]}"; 
 		ppt = new PoliqarpPlusTree("[base=foo]*[base=bar]");
@@ -543,7 +543,7 @@
 					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=bar, match=match:eq}}," +
 					"{@type=korap:group, operation=operation:repetition, operands=[" +
 					     "{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=foo, match=match:eq}}" +
-					"], boundary={@type=korap:boundary, min=0, max=100}, min=0, max=100 }" +
+					"], boundary={@type=korap:boundary, min=0}, min=0 }" +
 				"]}"; 
 		ppt = new PoliqarpPlusTree("[base=bar][base=foo]*");
 		map = ppt.getRequestMap().get("query").toString();
@@ -556,7 +556,7 @@
 						"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=bar, match=match:eq}}," +
 						"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=foo, match=match:eq}}" +
 					"]}" +
-				"], boundary={@type=korap:boundary, min=0, max=100}, min=0, max=100}" ;
+				"], boundary={@type=korap:boundary, min=0}, min=0}" ;
 		ppt = new PoliqarpPlusTree("([base=bar][base=foo])*");
 		map = ppt.getRequestMap().get("query").toString();
 		assertEquals(occ4.replaceAll(" ", ""), map.replaceAll(" ", ""));
@@ -570,7 +570,7 @@
 							"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=bar, match=match:eq}}," +
 							"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=foo, match=match:eq}}" +
 						"]}" +
-					"], boundary={@type=korap:boundary, min=0, max=100}, min=0, max=100 }" +
+					"], boundary={@type=korap:boundary, min=0}, min=0 }" +
 				"]}" ;
 		ppt = new PoliqarpPlusTree("<s>([base=bar][base=foo])*");
 		map = ppt.getRequestMap().get("query").toString();
@@ -586,7 +586,7 @@
 							"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=bar, match=match:eq}}," +
 							"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=foo, match=match:eq}}" +
 						"]}" +
-					"], boundary={@type=korap:boundary, min=0, max=100}, min=0, max=100 }" +
+					"], boundary={@type=korap:boundary, min=0}, min=0 }" +
 				"]}" ;
 		ppt = new PoliqarpPlusTree("<s><np>([base=bar][base=foo])*");
 		map = ppt.getRequestMap().get("query").toString();
@@ -604,7 +604,7 @@
 							"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=bar, match=match:eq}}," +
 							"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=foo, match=match:eq}}" +
 						"]}" +
-					"], boundary={@type=korap:boundary, min=0, max=100}, min=0, max=100 }," +
+					"], boundary={@type=korap:boundary, min=0}, min=0 }," +
 					"{@type=korap:token, wrap={@type=korap:term, layer=p, key=NN, match=match:eq}}" +
 				"]}" ;
 		ppt = new PoliqarpPlusTree("<s><np>([base=bar][base=foo])*[p=NN]");
@@ -619,7 +619,7 @@
 							"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=bar, match=match:eq}}," +
 							"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=foo, match=match:eq}}" +
 						"]}" +
-					"], boundary={@type=korap:boundary, min=0, max=100}, min=0, max=100 }," +
+					"], boundary={@type=korap:boundary, min=0}, min=0 }," +
 					"{@type=korap:token, wrap={@type=korap:term, layer=p, key=NN, match=match:eq}}" +
 				"]}" ;
 		ppt = new PoliqarpPlusTree("([base=bar][base=foo])*[p=NN]");
@@ -629,7 +629,7 @@
 		// [base=foo]+
 		String occ9 = "{@type=korap:group, operation=operation:repetition, operands=[" +
 					     "{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=foo, match=match:eq}}" +
-					  "], boundary={@type=korap:boundary, min=1, max=100}, min=1, max=100}"; 
+					  "], boundary={@type=korap:boundary, min=1}, min=1}"; 
 		ppt = new PoliqarpPlusTree("[base=foo]+");
 		map = ppt.getRequestMap().get("query").toString();
 		assertEquals(occ9.replaceAll(" ", ""), map.replaceAll(" ", ""));
@@ -661,7 +661,7 @@
 		// [base=foo]{2}
 		String occ13 = "{@type=korap:group, operation=operation:repetition, operands=[" +
 					     "{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=foo, match=match:eq}}" +
-					  "], boundary={@type=korap:boundary, min=2, max=100}, min=2, max=100}"; 
+					  "], boundary={@type=korap:boundary, min=2}, min=2}"; 
 		ppt = new PoliqarpPlusTree("[base=foo]{2,}");
 		map = ppt.getRequestMap().get("query").toString();
 		assertEquals(occ13.replaceAll(" ", ""), map.replaceAll(" ", ""));
@@ -947,7 +947,7 @@
 				  		"{@type=korap:span, key=s}," +
 				  		"{@type=korap:group, operation=operation:repetition, " +
 				  			"operands=[{@type=korap:token, wrap={@type=korap:term, layer=pos, key=N, match=match:eq}}" +
-				  			"], boundary={@type=korap:boundary, min=0, max=100}, min=0, max=100" +
+				  			"], boundary={@type=korap:boundary, min=0}, min=0" +
 				  		"}" +
 				  	"]}";
 		ppt = new PoliqarpPlusTree("contains(<s>,[pos=N]*)");
@@ -962,7 +962,7 @@
 				  		"{@type=korap:span, key=s}," +
 				  		"{@type=korap:group, operation=operation:repetition, " +
 				  			"operands=[{@type=korap:token, wrap={@type=korap:term, layer=pos, key=N, match=match:eq}}" +
-				  			"], boundary={@type=korap:boundary, min=0, max=100}, min=0, max=100" +
+				  			"], boundary={@type=korap:boundary, min=0}, min=0" +
 				  		"}" +
 				  	"]}" +
 				"]}";
