diff --git a/core/Changes b/core/Changes
index eb77c1b..91f2034 100644
--- a/core/Changes
+++ b/core/Changes
@@ -9,6 +9,7 @@
    - Fixed KoralNode at method (margaretha)
 11/12/2018
    - Removed document controllers and KustvaktResource (margaretha) 
+   - Fixed rewrite bugs (updated rewriteQuery & KoralNode) (margaretha)   
 
 version 0.61.3
 22/10/2018
diff --git a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionCleanRewrite.java b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionCleanRewrite.java
index 0d5e691..7a4ab70 100644
--- a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionCleanRewrite.java
+++ b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionCleanRewrite.java
@@ -18,9 +18,10 @@
 public class CollectionCleanRewrite implements RewriteTask.RewriteNodeAt {
 
     @Override
-    public JsonNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
+    public KoralNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
             User user) {
-        return process(node.rawNode());
+        JsonNode jsonNode = process(node.rawNode());
+        return node.wrapNode(jsonNode);
     }
 
 
diff --git a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/FoundryInject.java b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/FoundryInject.java
index 8562a4b..1048f1b 100644
--- a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/FoundryInject.java
+++ b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/FoundryInject.java
@@ -29,7 +29,7 @@
 
 
     @Override
-    public JsonNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
+    public KoralNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
             User user) throws KustvaktException {
         LayerMapper mapper;
         // EM: do not use DB
@@ -44,7 +44,7 @@
         if (node.get("@type").equals("koral:span")) {
             if (!node.isMissingNode("/wrap")){
                 node = node.at("/wrap");
-                JsonNode term = rewriteQuery(node, config, user);
+                JsonNode term = rewriteQuery(node, config, user).rawNode();
                 node.replaceAt("/wrap", term, new RewriteIdentifier("koral:term", "replace"));
             }
         }
@@ -58,7 +58,7 @@
             if (foundry != null)
                 node.put("foundry", foundry);
         }
-        return node.rawNode();
+        return node;
     }
 
 
diff --git a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/IdWriter.java b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/IdWriter.java
index e35fd17..4dc91b9 100644
--- a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/IdWriter.java
+++ b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/IdWriter.java
@@ -21,14 +21,14 @@
 
 
     @Override
-    public JsonNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
+    public KoralNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
             User user) {
         if (node.get("@type").equals("koral:token")) {
             String s = extractToken(node.rawNode());
             if (s != null && !s.isEmpty())
                 node.put("idn", s + "_" + counter++);
         }
-        return node.rawNode();
+        return node;
     }
 
 
diff --git a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/KoralNode.java b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/KoralNode.java
index d61247a..0bf497f 100644
--- a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/KoralNode.java
+++ b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/KoralNode.java
@@ -11,24 +11,29 @@
  * @author hanl
  * @date 04/07/2015
  */
-public abstract class KoralNode {
+public class KoralNode {
     private JsonNode node;
     private KoralRewriteBuilder rewrites;
     private boolean remove;
 
 
-    private KoralNode (JsonNode node) {
+    public KoralNode (JsonNode node) {
         this.node = node;
         this.rewrites = new KoralRewriteBuilder();
         this.remove = false;
     }
+    
+    public KoralNode (JsonNode node, KoralRewriteBuilder rewrites) {
+        this.node = node;
+        this.rewrites = rewrites;
+        this.remove = false;
+    }
 
 
     public static KoralNode wrapNode (JsonNode node) {
-        return new KoralNode(node) {};
+        return new KoralNode(node);
     }
-
-
+    
     public void buildRewrites (JsonNode node) {
         this.rewrites.build(node);
     }
@@ -151,7 +156,7 @@
     public KoralNode at (String name) {
 //        this.node = this.node.at(name);
 //        return this;
-        return wrapNode( this.node.at(name) );
+        return new KoralNode(this.node.at(name), this.rewrites);
     }
 
 
@@ -291,4 +296,6 @@
 //        this.node = this.node.get(i);
         return this.wrapNode(this.node.get(i));
     }
+    
+    
 }
diff --git a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/MetaConstraint.java b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/MetaConstraint.java
index 522ac45..f0e90e3 100644
--- a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/MetaConstraint.java
+++ b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/MetaConstraint.java
@@ -13,7 +13,7 @@
 
 
     @Override
-    public JsonNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
+    public KoralNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
             User user) {
         // redundant
         if (node.rawNode().has("meta")) {
@@ -21,7 +21,7 @@
             //todo: check meta parameter
             System.out.println("HAVE TO CHECK THE META ENTRIES");
         }
-        return node.rawNode();
+        return node;
     }
 
 
diff --git a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandler.java b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandler.java
index b9ff05c..59101c1 100644
--- a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandler.java
+++ b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandler.java
@@ -283,7 +283,7 @@
                 }
 
                 if (!post & task instanceof RewriteTask.RewriteQuery)
-                    ((RewriteTask.RewriteQuery) task).rewriteQuery(next,
+                    next = ((RewriteTask.RewriteQuery) task).rewriteQuery(next,
                             RewriteHandler.this.config, user);
                 else if (task instanceof RewriteTask.RewriteResult)
                     ((RewriteTask.RewriteResult) task).rewriteResult(next);
diff --git a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteTask.java b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteTask.java
index 9eab6ca..deb4cd7 100644
--- a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteTask.java
+++ b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteTask.java
@@ -29,7 +29,7 @@
          *            checked properly
          * @return
          */
-        JsonNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
+        KoralNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
                 User user) throws KustvaktException;
 
     }
diff --git a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/TreeConstraint.java b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/TreeConstraint.java
index 5713570..5235359 100644
--- a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/TreeConstraint.java
+++ b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/TreeConstraint.java
@@ -60,11 +60,11 @@
 
 
     @Override
-    public JsonNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
+    public KoralNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
             User user) {
         System.out.println("FIND PATH " + node.rawNode().findParent(pointer));
 
-        return node.rawNode();
+        return node;
     }
 
 
diff --git a/full/Changes b/full/Changes
index 49d53bd..d2d6755 100644
--- a/full/Changes
+++ b/full/Changes
@@ -17,6 +17,7 @@
    - Implemented revoking all tokens of a user client via a super client
    (margaretha)   
    - Removed document controllers and KustvaktResource (margaretha)
+   - Fixed rewrite bugs (updated rewriteQuery & KoralNode) (margaretha)
 
    
 # version 0.61.3
diff --git a/full/src/main/java/de/ids_mannheim/korap/rewrite/CollectionConstraint.java b/full/src/main/java/de/ids_mannheim/korap/rewrite/CollectionConstraint.java
index 3228f76..19040e9 100644
--- a/full/src/main/java/de/ids_mannheim/korap/rewrite/CollectionConstraint.java
+++ b/full/src/main/java/de/ids_mannheim/korap/rewrite/CollectionConstraint.java
@@ -15,7 +15,7 @@
 public class CollectionConstraint implements RewriteTask.IterableRewritePath {
 
     @Override
-    public JsonNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
+    public KoralNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
             User user) {
         if (node.get("@type").equals("koral:doc")) {
             if (node.get("key").equals(Attributes.CORPUS_SIGLE)) {
@@ -27,7 +27,7 @@
                             Attributes.CORPUS_SIGLE, id));
             }
         }
-        return node.rawNode();
+        return node;
     }
 
 
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 153c3db..806069b 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
@@ -11,8 +11,8 @@
 import com.google.common.collect.Lists;
 
 import de.ids_mannheim.korap.config.Attributes;
-import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.config.FullConfiguration;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.query.object.KoralMatchOperator;
 import de.ids_mannheim.korap.query.object.KoralOperation;
@@ -127,7 +127,7 @@
     }
 
     @Override
-    public JsonNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
+    public KoralNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
             User user) throws KustvaktException {
         JsonNode jsonNode = node.rawNode();
 
@@ -188,7 +188,7 @@
         node = node.at("/collection");
         jlog.debug("REWRITES: " + node.toString());
         
-        return node.rawNode();
+        return node;
     }
 
 
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 320dcdb..55110d0 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
@@ -24,13 +24,13 @@
     private VirtualCorpusService vcService;
 
     @Override
-    public JsonNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
+    public KoralNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
             User user) throws KustvaktException {
         if (node.has("collection")) {
             node = node.at("/collection");
             findVCRef(user.getUsername(), node);
         }
-        return node.rawNode();
+        return node;
     }
 
     private void findVCRef (String username, KoralNode koralNode)
diff --git a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
index f153baa..28bab56 100644
--- a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
@@ -241,6 +241,7 @@
                 node.at("/collection/operands/1/operands/0/key").asText());
         assertEquals("textClass",
                 node.at("/collection/operands/1/operands/1/key").asText());
+        System.out.println(node);
         assertEquals("koral:rewrite", node.at("/collection/rewrites/0/@type")
                 .asText());
         assertEquals("availability(FREE)", node.at("/collection/rewrites/0/scope")
diff --git a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/VirtualCorpusRewriteTest.java b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/VirtualCorpusRewriteTest.java
index e91dde2..7702beb 100644
--- a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/VirtualCorpusRewriteTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/VirtualCorpusRewriteTest.java
@@ -36,32 +36,31 @@
     private VirtualCorpusDao dao;
 
     @Test
-    public void testNoRewriteWithCachedVCRef ()
+    public void testCachedVCRef ()
             throws KustvaktException, IOException, QueryException {
         KrillCollection.cache = CacheManager.newInstance().getCache("named_vc");
         vcLoader.loadVCToCache("named-vc1", "/vc/named-vc1.jsonld");
 
-        // ClientResponse response =
-        // resource().path(API_VERSION).path("search")
-        // .queryParam("q", "[orth=der]").queryParam("ql", "poliqarp")
-        // .queryParam("cq", "referTo named-vc1")
-        // .get(ClientResponse.class);
-        //
-        // String ent = response.getEntity(String.class);
-        // JsonNode node = JsonUtils.readTree(ent);
-        // node = node.at("/collection");
-        //
-        // assertEquals("koral:docGroup", node.at("/@type").asText());
-        // assertTrue(node.at("/operands/1/rewrites").isMissingNode());
+        ClientResponse response = resource().path(API_VERSION).path("search")
+                .queryParam("q", "[orth=der]").queryParam("ql", "poliqarp")
+                .queryParam("cq", "referTo named-vc1")
+                .get(ClientResponse.class);
 
-        testNoRewriteWithUsername();
+        String ent = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(ent);
+        node = node.at("/collection");
+
+        assertEquals("koral:docGroup", node.at("/@type").asText());
+        assertTrue(node.at("/operands/1/rewrites").isMissingNode());
+
+        testCachedVCRefWithUsername();
 
         KrillCollection.cache.removeAll();
         VirtualCorpus vc = dao.retrieveVCByName("named-vc1", "system");
         dao.deleteVirtualCorpus(vc);
     }
 
-    private void testNoRewriteWithUsername ()
+    private void testCachedVCRefWithUsername ()
             throws KustvaktException, IOException, QueryException {
 
         ClientResponse response = resource().path(API_VERSION).path("search")
@@ -144,7 +143,6 @@
         String ent = response.getEntity(String.class);
         JsonNode node = JsonUtils.readTree(ent);
         node = node.at("/collection");
-        // System.out.println(node);
         assertEquals("koral:docGroup", node.at("/@type").asText());
         node = node.at("/operands/1/rewrites");
         assertEquals(3, node.size());
