diff --git a/Changes b/Changes
index 5d1d42d..e76a4e8 100755
--- a/Changes
+++ b/Changes
@@ -1,6 +1,8 @@
-0.29 2018-08-30
+0.29 2018-08-31
         - Deprecated Kalamar.api configuration key
           in favor of Kalamar.api_path.
+        - Fix replacement of docs with docGroupRefs in
+          VC builder.
 
 0.28 2018-08-29
         - Introduced Widget based plugin system.
diff --git a/dev/js/spec/vcSpec.js b/dev/js/spec/vcSpec.js
index ef033ab..33953b5 100644
--- a/dev/js/spec/vcSpec.js
+++ b/dev/js/spec/vcSpec.js
@@ -827,7 +827,7 @@
     });
 
     
-    it('should be replaceable by a docGroupRef', function () {
+    it('should be replaceable by docGroupRef with deletion', function () {
       var vc = vcClass.create().fromJson({
         "@type" : "koral:doc",
         "key":"Titel",
@@ -854,9 +854,82 @@
 
       expect(vcE.firstChild.firstChild.textContent).toEqual("referTo");
       expect(vcE.firstChild.children[1].getAttribute("data-type")).toEqual("string");
+
       expect(vcE.firstChild.children.length).toEqual(3);
       expect(vcE.firstChild.children[1].classList.contains("unspecified")).toBeTruthy();      
     });
+
+
+    it('should be replaceable by docGroupRef on root', function () {
+      var vc = vcClass.create().fromJson({
+        "@type" : "koral:doc",
+        "key":"Titel",
+        "value":"Baum",
+        "match":"match:eq"
+      });
+
+      expect(vc.toQuery()).toEqual("Titel = \"Baum\"");
+
+      var vcE = vc.builder();
+      expect(vcE.firstChild.children.length).toEqual(4);
+
+      // Click on the key
+      vcE.firstChild.firstChild.click();
+
+      expect(vcE.firstChild.getElementsByTagName("LI")[0].textContent).toEqual("referTo");
+
+      // Click on referTo
+      vcE.firstChild.getElementsByTagName("LI")[0].click();
+
+      // Now it's a referTo element
+      expect(vcE.firstChild.firstChild.textContent).toEqual("referTo");
+      expect(vcE.firstChild.children.length).toEqual(3);
+      expect(vcE.firstChild.children[1].classList.contains("unspecified")).toBeTruthy();
+    });
+
+    it('should be replaceable by docGroupRef nested', function () {
+      var vc = vcClass.create().fromJson({
+        "@type" : "koral:docGroup",
+        "operation" : "operation:and",
+        "operands" : [
+          {
+            "@type": 'koral:doc',
+            "key" : 'author',
+            "match": 'match:eq',
+            "value": 'Max Birkendale',
+            "type": 'type:string'
+          },
+          {
+            "@type": 'koral:doc',
+            "key": 'pubDate',
+            "match": 'match:eq',
+            "value": '2014-12-05',
+            "type": 'type:date'
+          }
+        ]
+      });
+
+      expect(vc.toQuery()).toEqual("author = \"Max Birkendale\" & pubDate in 2014-12-05");
+
+      var vcE = vc.builder();
+
+      // First doc
+      var doc = vcE.firstChild.firstChild;
+      expect(doc.children.length).toEqual(4);
+
+      // Click on the key
+      doc.firstChild.click();
+
+      expect(doc.getElementsByTagName("LI")[0].textContent).toEqual("referTo");
+      
+      // Click on referTo
+      vcE.firstChild.getElementsByTagName("LI")[0].click();
+
+      // Now it's a referTo element
+      expect(vcE.firstChild.firstChild.firstChild.textContent).toEqual("referTo");
+      expect(vcE.firstChild.firstChild.children.length).toEqual(3);
+      expect(vcE.firstChild.firstChild.children[1].classList.contains("unspecified")).toBeTruthy();
+    });
   });
 
   describe('KorAP.DocGroup element', function () {
diff --git a/dev/js/src/vc/doc.js b/dev/js/src/vc/doc.js
index 821aa64..996c347 100644
--- a/dev/js/src/vc/doc.js
+++ b/dev/js/src/vc/doc.js
@@ -6,8 +6,9 @@
   'vc/jsonld',
   'vc/rewritelist',
   'vc/stringval',
+  'vc/docgroupref',
   'util'
-], function (jsonldClass, rewriteListClass, stringValClass) {
+], function (jsonldClass, rewriteListClass, stringValClass, docGroupRefClass) {
 
   /*
    * TODO:
@@ -178,6 +179,20 @@
       return parent.replaceOperand(this, group).update();
     },
 
+    replaceWith : function (op) {
+      var p = this.parent();
+
+      if (p.ldType() === 'docGroup') {
+        p.replaceOperand(this,op);
+      }
+      else if (p.ldType() == null) {
+        p.root(op);
+      };
+      p.update();
+
+      this.destroy();
+    },
+    
     /**
      * Deserialize from json
      */
@@ -372,14 +387,22 @@
       // Release event
       var that = this;
       menu.released(function (key, type) {
-        var doc = that.key(key).type(type);
 
-        // This may not be compatible - then switch to default
-        doc.matchop(doc.matchop());
-        doc.value(doc.value());
+        if (type === 'ref') {
+          // KorAP._delete.bind(that);
+          var ref = docGroupRefClass.create(that.parent());
+          that.replaceWith(ref);
+        }
+        else {
+          var doc = that.key(key).type(type);
 
-        // Update the doc
-        doc.update();
+          // This may not be compatible - then switch to default
+          doc.matchop(doc.matchop());
+          doc.value(doc.value());
+
+          // Update the doc
+          doc.update();
+        };
 
         // hide!
         this.hide();
