diff --git a/full/Changes b/full/Changes
index e789a76..45cab74 100644
--- a/full/Changes
+++ b/full/Changes
@@ -12,6 +12,7 @@
      (margaretha)
 6/12/2018
    - Added debug flags to mitigate log4j debugging performance (margaretha)
+   - Fixed KoralNode at() method (margaretha)
    
 # version 0.61.3
 17/10/2018
diff --git a/full/src/main/java/de/ids_mannheim/korap/rewrite/CollectionRewrite.java b/full/src/main/java/de/ids_mannheim/korap/rewrite/CollectionRewrite.java
index 091c1a8..153c3db 100644
--- a/full/src/main/java/de/ids_mannheim/korap/rewrite/CollectionRewrite.java
+++ b/full/src/main/java/de/ids_mannheim/korap/rewrite/CollectionRewrite.java
@@ -48,9 +48,11 @@
  */
 public class CollectionRewrite implements RewriteTask.RewriteQuery {
 
-    private static Logger jlog =
+    public static Logger jlog =
             LogManager.getLogger(CollectionRewrite.class);
 
+    public static boolean DEBUG = false;
+    
     public CollectionRewrite () {
         super();
     }
@@ -59,11 +61,13 @@
     private List<String> checkAvailability (JsonNode node,
             List<String> originalAvailabilities,
             List<String> updatedAvailabilities, boolean isOperationOr) {
-        try {
-            jlog.debug(JsonUtils.toJSON(node));
-        }
-        catch (KustvaktException e) {
-            e.printStackTrace();
+        if (DEBUG) {
+            try {
+                jlog.debug(JsonUtils.toJSON(node));
+            }
+            catch (KustvaktException e) {
+                e.printStackTrace();
+            }
         }
 
         if (node.has("operands")) {
@@ -105,11 +109,15 @@
 
             if (originalAvailabilities.contains(queryAvailability)
                     && matchOp.equals(KoralMatchOperator.EQUALS.toString())) {
-                jlog.debug("REMOVE " + queryAvailability);
+                if (DEBUG) {
+                    jlog.debug("REMOVE " + queryAvailability);
+                }
                 updatedAvailabilities.remove(queryAvailability);
             }
             else if (isOperationOr) {
-                jlog.debug("RESET availabilities 2");
+                if (DEBUG) { 
+                    jlog.debug("RESET availabilities 2");
+                }
                 updatedAvailabilities.clear();
                 updatedAvailabilities.addAll(originalAvailabilities);
                 return updatedAvailabilities;
@@ -150,14 +158,18 @@
             List<String> avalabilityCopy =
                     new ArrayList<String>(userAvailabilities.size());
             avalabilityCopy.addAll(userAvailabilities);
-            jlog.debug("Availabilities: "
-                    + Arrays.toString(userAvailabilities.toArray()));
+            if (DEBUG) {
+                jlog.debug("Availabilities: "
+                        + Arrays.toString(userAvailabilities.toArray()));
+            }
 
             userAvailabilities = checkAvailability(jsonNode.at("/collection"),
                     avalabilityCopy, userAvailabilities, false);
             if (!userAvailabilities.isEmpty()) {
                 builder.with(buildAvailability(avalabilityCopy));
-                jlog.debug("corpus query: " + builder.toString());
+                if (DEBUG) {
+                    jlog.debug("corpus query: " + builder.toString());
+                }
                 builder.setBaseQuery(builder.toJSON());
                 rewrittenNode = builder.mergeWith(jsonNode).at("/collection");
                 node.set("collection", rewrittenNode, identifier);
@@ -165,13 +177,17 @@
         }
         else {
             builder.with(buildAvailability(userAvailabilities));
-            jlog.debug("corpus query: " + builder.toString());
+            if (DEBUG) {
+                jlog.debug("corpus query: " + builder.toString());
+            }
             rewrittenNode =
                     JsonUtils.readTree(builder.toJSON()).at("/collection");
             node.set("collection", rewrittenNode, identifier);
         }
 
-        jlog.debug("REWRITES: " + node.at("/collection").toString());
+        node = node.at("/collection");
+        jlog.debug("REWRITES: " + node.toString());
+        
         return node.rawNode();
     }
 
diff --git a/full/src/main/java/de/ids_mannheim/korap/rewrite/VirtualCorpusRewrite.java b/full/src/main/java/de/ids_mannheim/korap/rewrite/VirtualCorpusRewrite.java
index 2154c47..320dcdb 100644
--- a/full/src/main/java/de/ids_mannheim/korap/rewrite/VirtualCorpusRewrite.java
+++ b/full/src/main/java/de/ids_mannheim/korap/rewrite/VirtualCorpusRewrite.java
@@ -27,7 +27,8 @@
     public JsonNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
             User user) throws KustvaktException {
         if (node.has("collection")) {
-            findVCRef(user.getUsername(), node.at("/collection"));
+            node = node.at("/collection");
+            findVCRef(user.getUsername(), node);
         }
         return node.rawNode();
     }
