diff --git a/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewrite.java b/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewrite.java
index 142b9f6..d69538e 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewrite.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewrite.java
@@ -48,7 +48,8 @@
                 && node.at("/key").asText().equals("availability")) {
             String queryAvailability = node.at("/value").asText();
             String matchOp = node.at("/match").asText();
-            if (!userAvailabilities.contains(queryAvailability)){
+            if (userAvailabilities.contains(queryAvailability) && matchOp.
+                    equals(KoralMatchOperator.EQUALS.toString())){
                 userAvailabilities.remove(queryAvailability);
             }
         }
diff --git a/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java b/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java
index 53786b6..0268dca 100644
--- a/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java
+++ b/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java
@@ -118,7 +118,7 @@
             try {
             	km = this.index.getMatch(id);
             	String availability = km.getAvailability();
-            	if (availability != null){
+            	if (licensePattern!=null && availability != null){
             		Matcher m = licensePattern.matcher(availability);
             		if (!m.matches()){
             			km = new Match();
@@ -151,7 +151,7 @@
                         layers, includeSpans, includeHighlights,
                         sentenceExpansion);
             	String availability = km.getAvailability();
-            	if (availability != null){
+            	if (licensePattern !=null && availability != null){
             		Matcher m = licensePattern.matcher(availability);
             		if (!m.matches()){
             			km = new Match();
diff --git a/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java b/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
index 946b342..c9785f4 100644
--- a/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
+++ b/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
@@ -320,10 +320,10 @@
         boolean match_only = foundries == null || foundries.isEmpty();
         String results;
         if (match_only)
-            results = searchKrill.getMatch(matchid, config.getFreeLicensePattern());
+            results = searchKrill.getMatch(matchid,null);
         else
             results = searchKrill.getMatch(matchid, f_list, l_list, spans,
-                    false, true, config.getFreeLicensePattern());
+                    false, true,null);
 
         return Response.ok(results).build();
     }
