diff --git a/dev/js/spec/vcSpec.js b/dev/js/spec/vcSpec.js
index 388a26d..5c1fdfd 100644
--- a/dev/js/spec/vcSpec.js
+++ b/dev/js/spec/vcSpec.js
@@ -1869,6 +1869,42 @@
       vc.addRequired(doc5);
       expect(vc.toQuery()).toEqual('referTo "@max/myCorpus" & author = "Goethe"');
     });
+
+    it('should be replaceble via JSON', function () {
+      let vc = KorAP.vc = vcClass.create().fromJson({
+        "@type" : 'koral:docGroup',
+        'operation' : 'operation:or',
+        'operands' : [
+          {
+            '@type' : 'koral:doc',
+            'key' : 'title',
+            'value' : 'Hello World!'
+          },
+          {
+            '@type' : 'koral:doc',
+            'key' : 'foo',
+            'value' : 'bar'
+          }
+        ]
+      });
+
+      expect(vc.toQuery()).toEqual('title = "Hello World!" | foo = "bar"')
+
+      let e = vc.element();
+      expect(e.firstChild.firstChild.firstChild.children[0].textContent).toEqual("title");
+      expect(e.firstChild.firstChild.firstChild.children[2].textContent).toEqual("Hello World!");
+
+      vc.fromJson({
+        '@type' : 'koral:doc',
+        'key' : 'foo',
+        'value' : 'bar'
+      });
+
+      expect(vc.toQuery()).toEqual('foo = "bar"');
+      e = vc.element();
+      expect(e.firstChild.firstChild.children[0].textContent).toEqual("foo");
+      expect(e.firstChild.firstChild.children[2].textContent).toEqual("bar");
+    })
   });
 
 
diff --git a/dev/js/src/vc.js b/dev/js/src/vc.js
index 5d1ccf0..fd22a97 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -178,19 +178,22 @@
      * corpus document
      */
     fromJson : function(json) {
+
+      let obj;
+      
       if (json !== undefined) {
         // Parse root document
         if (json['@type'] == 'koral:doc') {
-          this._root = docClass.create(this, json);
+          obj = docClass.create(this, json);
         }
         // parse root group
         else if (json['@type'] == 'koral:docGroup') {
-          this._root = docGroupClass.create(this, json);
+          obj = docGroupClass.create(this, json);
         }
 
         // parse root reference
         else if (json['@type'] == 'koral:docGroupRef') {
-          this._root = docGroupRefClass.create(this, json);
+          obj = docGroupRefClass.create(this, json);
         }
         
         // Unknown collection type
@@ -202,12 +205,12 @@
 
       else {
         // Add unspecified object
-        this._root = unspecDocClass.create(this);
+        obj = unspecDocClass.create(this);
       };
 
       // Init element and update
-      this.update();
-
+      this.root(obj);   
+ 
       return this;
     },
 
diff --git a/dev/js/src/vc/docgroup.js b/dev/js/src/vc/docgroup.js
index c73a325..3a22034 100644
--- a/dev/js/src/vc/docgroup.js
+++ b/dev/js/src/vc/docgroup.js
@@ -210,8 +210,10 @@
 
       group.appendChild(op.element());
 
-      var vcchevent = new CustomEvent('vcChange', {'detail':this});
-      KorAP.vc.element().dispatchEvent(vcchevent);
+      if (KorAP.vc) {
+        var vcchevent = new CustomEvent('vcChange', {'detail':this});
+        KorAP.vc.element().dispatchEvent(vcchevent);
+      };
       
       return this;
     },
