diff --git a/dev/js/spec/vcSpec.js b/dev/js/spec/vcSpec.js
index 7beede7..83ee822 100644
--- a/dev/js/spec/vcSpec.js
+++ b/dev/js/spec/vcSpec.js
@@ -658,6 +658,9 @@
 
   
   describe('KorAP.VC.UnspecifiedDoc', function () {
+
+    KorAP.vc = undefined;
+    
     it('should be initializable', function () {
       var doc = unspecifiedClass.create();
       var docElement = doc.element();
@@ -1288,7 +1291,7 @@
       expect(vcE.firstChild.children[1].getAttribute('data-type')).toEqual('string');
       expect(vcE.firstChild.children[1].textContent).toEqual("myCorpus");
     });
-
+   
     it('should be based on a nested docGroup', function () {
       var vc = nestedGroupFactory.create();
 
@@ -1323,6 +1326,28 @@
       expect(vc.toQuery()).toEqual('referTo "myCorpus" & Titel = "Baum"');
     });
 
+    it('should accept an undefined KorAP.vc', function () {
+      let temp = KorAP.vc;
+      KorAP.vc = undefined;
+      const vc = vcClass.create().fromJson({
+        "@type" : "koral:docGroup",
+        "operation" : "operation:and",
+        "operands" : [{
+          "@type" : "koral:docGroupRef",
+          "ref":"myCorpus"
+        },{
+          "@type" : "koral:doc",
+          "key":"Titel",
+          "value":"Baum",
+          "match":"match:eq"
+        }]
+      });
+
+      expect(vc._root.ldType()).toEqual("docGroup");
+      expect(vc.toQuery()).toEqual('referTo "myCorpus" & Titel = "Baum"');
+
+      KorAP.vc = temp;
+    });    
     
     it('should be modifiable by deletion in flat docGroups', function () {
       var vc = flatGroupFactory.create();
diff --git a/dev/js/src/vc/docgroupref.js b/dev/js/src/vc/docgroupref.js
index 5a9196b..3709c63 100644
--- a/dev/js/src/vc/docgroupref.js
+++ b/dev/js/src/vc/docgroupref.js
@@ -60,12 +60,12 @@
 
       // Set ref - TODO: Cleanup!
       e.refTo = t;
-
+     
       // Was rewritten
       if (t.rewrites() !== undefined) {
         e.classList.add("rewritten");
       };
-
+     
       const refTitle = document.createElement('span');
       refTitle.classList.add('key','fixed', 'ref');
       refTitle.addT('referTo');
@@ -101,7 +101,7 @@
       if (t._rewrites !== undefined) {
         e.appendChild(t._rewrites.element());
       };
-
+     
       if (t._parent !== undefined) {
 
         // Set operators
@@ -112,10 +112,12 @@
           true
         ).element());
       };  
-     
-      KorAP.vc.element().dispatchEvent(
-        new CustomEvent('vcChange', { 'detail' : t })
-      );
+
+      if (KorAP.vc !== undefined) {
+        KorAP.vc.element().dispatchEvent(
+          new CustomEvent('vcChange', { 'detail' : t })
+        );
+      };
       
       return t.element();
     },
