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 02d4e0d..e6ef5cd 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
@@ -880,6 +880,7 @@
         String[] minmax = new String[2];
         Integer min = 1;
         Integer max = 1;
+        boolean infinite = false;
         ParseTree child;
         for (int i = 0; i < emptySegments.getChildCount() - 1; i++) {
             child = emptySegments.getChild(i);
@@ -888,7 +889,13 @@
             if (child.toStringTree().equals("[]")) {
                 if (nextSiblingString.equals("?")) {
                     max++;
-                } else if (nextSiblingString.startsWith("{")) {
+                } else if (nextSiblingString.equals("+")) {
+                	min++;
+                	infinite = true;
+                } else if (nextSiblingString.equals("*")) {
+                	infinite = true;
+                }
+                else if (nextSiblingString.startsWith("{")) {
                     String occ = nextSiblingString.substring(1, nextSiblingString.length() - 1);
                     System.out.println(occ);
                     if (occ.contains(",")) {
@@ -910,6 +917,7 @@
             min++;
             max++;
         }
+        if (infinite) max = MAXIMUM_DISTANCE;
         minmax[0] = min.toString();
         minmax[1] = max.toString();
         return minmax;
@@ -984,7 +992,7 @@
                 "contains(<cnx/c=np>, [mate/pos=NE])",
                 "matches(<A>,[pos=N]*)",
                 "[base=Auto]matches(<A>,[][pos=N]{4})",
-                "[base=der][][base=Mann]"
+                "[base=der][]*[base=Mann]"
         };
 //		PoliqarpPlusTree.verbose=true;
         for (String q : queries) {
@@ -993,6 +1001,7 @@
 //				System.out.println(PoliqarpPlusTree.parsePoliqarpQuery(q).toStringTree(PoliqarpPlusTree.parser));
                 @SuppressWarnings("unused")
                 PoliqarpPlusTree pt = new PoliqarpPlusTree(q);
+                System.out.println(pt.parsePoliqarpQuery(q).toStringTree(pt.parser));
                 System.out.println(q);
                 System.out.println();
 
diff --git a/src/test/java/PoliqarpPlusTreeTest.java b/src/test/java/PoliqarpPlusTreeTest.java
index 3fab91f..2c6eeaf 100644
--- a/src/test/java/PoliqarpPlusTreeTest.java
+++ b/src/test/java/PoliqarpPlusTreeTest.java
@@ -172,6 +172,31 @@
 		map = ppt.getRequestMap().get("query").toString();
 		assertEquals(et5.replaceAll(" ", ""), map.replaceAll(" ", ""));
 		
+		// [base=der][]*[base=Mann]
+		String et6 = 
+			"{@type=korap:group, operation=operation:sequence, inOrder=true, distances=[" +
+				"{@type=korap:distance, key=w, min=1, max=100}" +
+			"], " +
+			"operands=[" +
+				"{@type=korap:token, wrap={@type=korap:term, key=der, layer=lemma, match=match:eq}}," +
+				"{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=lemma, match=match:eq}}" +
+			"]}";
+		ppt = new PoliqarpPlusTree("[base=der][]*[base=Mann]");
+		map = ppt.getRequestMap().get("query").toString();
+		assertEquals(et6.replaceAll(" ", ""), map.replaceAll(" ", ""));
+		
+		// [base=der][]*[base=Mann]
+		String et7 = 
+			"{@type=korap:group, operation=operation:sequence, inOrder=true, distances=[" +
+				"{@type=korap:distance, key=w, min=2, max=100}" +
+			"], " +
+			"operands=[" +
+				"{@type=korap:token, wrap={@type=korap:term, key=der, layer=lemma, match=match:eq}}," +
+				"{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=lemma, match=match:eq}}" +
+			"]}";
+		ppt = new PoliqarpPlusTree("[base=der][]+[base=Mann]");
+		map = ppt.getRequestMap().get("query").toString();
+		assertEquals(et7.replaceAll(" ", ""), map.replaceAll(" ", ""));
 	}
 
 	@Test
