diff --git a/full/Changes b/full/Changes
index 91f4520..51705e0 100644
--- a/full/Changes
+++ b/full/Changes
@@ -10,6 +10,8 @@
 18/09/2018
     - Handled unique constraints (margaretha)
     - Added a controller for editing user group member roles (margaretha)
+19/09/2018
+    - Fixed cached-VC ref with username (margaretha)
 
 # version 0.61.1
 28/08/2018
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 86d11c5..2154c47 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
@@ -43,11 +43,13 @@
             else {
                 String vcName = koralNode.get("ref");
                 String vcOwner = "system";
+                boolean ownerExist = false;
                 if (vcName.contains("/")) {
                     String[] names = vcName.split("/");
                     if (names.length == 2) {
                         vcOwner = names[0];
                         vcName = names[1];
+                        ownerExist = true;
                     }
                 }
 
@@ -56,6 +58,9 @@
                 if (!vc.isCached()) {
                     rewriteVC(vc, koralNode);
                 }
+                else if (ownerExist) {
+                    removeOwner(vc.getKoralQuery(), vcOwner, koralNode);
+                }
             }
 
         }
@@ -71,6 +76,16 @@
         }
     }
 
+    private void removeOwner (String koralQuery, String vcOwner,
+            KoralNode koralNode) throws KustvaktException {
+        JsonNode jsonNode = koralNode.rawNode();
+        String ref = jsonNode.at("/ref").asText();
+        koralNode.remove("ref", new RewriteIdentifier("ref", ref));
+
+        ref = ref.substring(vcOwner.length()+1, ref.length());
+        koralNode.set("ref", ref, new RewriteIdentifier("ref", ref));
+    }
+
     private void rewriteVC (VirtualCorpus vc, KoralNode koralNode)
             throws KustvaktException {
         String koralQuery = vc.getKoralQuery();
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 04931d8..e91dde2 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
@@ -34,32 +34,56 @@
     private NamedVCLoader vcLoader;
     @Autowired
     private VirtualCorpusDao dao;
-    
+
     @Test
     public void testNoRewriteWithCachedVCRef ()
             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());
+
+        testNoRewriteWithUsername();
+
+        KrillCollection.cache.removeAll();
+        VirtualCorpus vc = dao.retrieveVCByName("named-vc1", "system");
+        dao.deleteVirtualCorpus(vc);
+    }
+
+    private void testNoRewriteWithUsername ()
+            throws KustvaktException, IOException, QueryException {
+
         ClientResponse response = resource().path(API_VERSION).path("search")
                 .queryParam("q", "[orth=der]").queryParam("ql", "poliqarp")
-                .queryParam("cq", "referTo named-vc1")
+                .queryParam("cq", "referTo \"system/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());
-        
-        KrillCollection.cache.removeAll();
-        VirtualCorpus vc = dao.retrieveVCByName("named-vc1", "system");
-        dao.deleteVirtualCorpus(vc);
+
+        node = node.at("/operands/1/rewrites");
+        assertEquals(2, node.size());
+        assertEquals("operation:deletion", node.at("/0/operation").asText());
+        assertEquals("operation:insertion", node.at("/1/operation").asText());
+
     }
-    
+
     @Test
-    public void testRewriteFreeAndSystemVCRef () throws KustvaktException, Exception {
+    public void testRewriteFreeAndSystemVCRef ()
+            throws KustvaktException, Exception {
         ClientResponse response = resource().path(API_VERSION).path("search")
                 .queryParam("q", "[orth=der]").queryParam("ql", "poliqarp")
                 .queryParam("cq", "referTo \"system VC\"")
@@ -71,7 +95,7 @@
 
         assertEquals("koral:docGroup", node.at("/@type").asText());
         assertEquals("koral:doc", node.at("/operands/0/@type").asText());
-        
+
         assertEquals("koral:doc", node.at("/operands/1/@type").asText());
         assertEquals("GOE", node.at("/operands/1/value").asText());
         assertEquals("corpusSigle", node.at("/operands/1/key").asText());
@@ -98,7 +122,7 @@
         node = node.at("/collection");
         assertEquals("koral:docGroup", node.at("/@type").asText());
         assertEquals("koral:docGroup", node.at("/operands/0/@type").asText());
-        
+
         node = node.at("/operands/1/rewrites");
         assertEquals(3, node.size());
         assertEquals("operation:deletion", node.at("/0/operation").asText());
@@ -120,7 +144,7 @@
         String ent = response.getEntity(String.class);
         JsonNode node = JsonUtils.readTree(ent);
         node = node.at("/collection");
-//        System.out.println(node);
+        // System.out.println(node);
         assertEquals("koral:docGroup", node.at("/@type").asText());
         node = node.at("/operands/1/rewrites");
         assertEquals(3, node.size());
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/VCReferenceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/VCReferenceTest.java
index 55f289d..997da1a 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/VCReferenceTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/VCReferenceTest.java
@@ -80,13 +80,12 @@
     public void testSearchWithVCRefEqual () throws KustvaktException {
         ClientResponse response = resource().path(API_VERSION).path("search")
                 .queryParam("q", "[orth=der]").queryParam("ql", "poliqarp")
-                .queryParam("cq", "referTo named-vc1")
+                .queryParam("cq", "referTo \"system/named-vc1\"")
                 .get(ClientResponse.class);
 
         String ent = response.getEntity(String.class);
         JsonNode node = JsonUtils.readTree(ent);
         assertTrue(node.at("/matches").size() > 0);
-
     }
 
     public void testSearchWithVCRefNotEqual () throws KustvaktException {
