diff --git a/dev/demo/vcdemo.js b/dev/demo/vcdemo.js
index 4e0eaed..b9a7b1a 100644
--- a/dev/demo/vcdemo.js
+++ b/dev/demo/vcdemo.js
@@ -129,6 +129,10 @@
       ['author', 'text']
     ]).fromJson(json);
 
+    document.addEventListener('vcChange', function (e) {
+      KorAP.vc.checkStatActive(e.detail);
+      }, false);
+    
     document.getElementById('vc-view').appendChild(KorAP.vc.element());
 
     KorAP.vc.open();
diff --git a/dev/js/spec/statSpec.js b/dev/js/spec/statSpec.js
index 864a8ca..25e55a2 100644
--- a/dev/js/spec/statSpec.js
+++ b/dev/js/spec/statSpec.js
@@ -100,6 +100,43 @@
    return vc;
   }
   
+  /**
+   * Generate corpus doc group with more entries
+   */
+  generateBCorpusDocGr = function(){  
+    let vc = vcClass.create().fromJson({
+      "@type": "koral:docGroup",
+      "operation": "operation:or", 
+      "operands": [{
+        "@type" : 'koral:docGroup',
+        'operation' : 'operation:or',
+        'operands' : [
+          {
+            '@type' : 'koral:doc',
+            'key' : 'title', 
+            'match': 'match:eq',
+            'value' : 'Hello World!'
+          },
+          {
+            '@type' : 'koral:doc',   
+            'match': 'match:eq',
+            'key' : 'foo',
+            'value' : 'bar'
+          }
+          ]
+      },
+      {
+        '@type' : 'koral:doc',   
+        'match': 'match:eq',
+        'key' : 'author',
+        'value' : 'Goethe'
+      }
+      ]
+    });
+    
+   return vc;
+  }
+  
   generateCorpusDoc = function(){
     let vc= vcClass.create().fromJson({
         '@type' : 'koral:doc',
@@ -318,11 +355,13 @@
      * in vc builder through user-interaction
      */
 	describe ('KorAP.CorpusStat.Disable', function(){
-	  
+	
 	  document.addEventListener('vcChange', function (e) {
+	    if(KorAP.vc){
         KorAP.vc.checkStatActive(e.detail);
+	    }
         }, false);
-	    
+	  
 	  /**
 	   * If the user defines a new vc, the statistic should be disabled,
 	   * because it is out-of-date.
@@ -380,7 +419,20 @@
         KorAP._delete.apply(KorAP.vc.root());
         view = panel.firstChild.firstChild;
         expect(checkStatDisabled(view, show)).toBe(true);     
-      
+        
+        KorAP.vc  = generateBCorpusDocGr();
+        // create corpus builder and corpus statistic;
+        show = document.createElement('div');
+        show.appendChild(KorAP.vc.element());   
+        panel = show.firstChild.lastChild.firstChild;
+        panel.lastChild.children[0].click();
+        view = panel.firstChild.firstChild;
+
+        expect(checkStatActive(view, show)).toBe(true);
+        KorAP._delete.apply(KorAP.vc.root().getOperand(1));
+        view = panel.firstChild.firstChild;
+        expect(checkStatDisabled(view, show)).toBe(true); 
+              
       });
       
       
diff --git a/dev/js/src/vc/docgroup.js b/dev/js/src/vc/docgroup.js
index 10a6495..858e847 100644
--- a/dev/js/src/vc/docgroup.js
+++ b/dev/js/src/vc/docgroup.js
@@ -210,6 +210,9 @@
 
       group.appendChild(op.element());
 
+      var vcchevent = new CustomEvent('vcChange', {'detail':this});
+      document.dispatchEvent(vcchevent);
+      
       return this;
     },
 
diff --git a/dev/js/src/vc/docgroupref.js b/dev/js/src/vc/docgroupref.js
index 3b7bd6d..f72e27a 100644
--- a/dev/js/src/vc/docgroupref.js
+++ b/dev/js/src/vc/docgroupref.js
@@ -109,7 +109,7 @@
         // Append new operators
         e.appendChild(op.element());
       };  
-
+     
       var vcchevent = new CustomEvent('vcChange', {'detail':this});
       document.dispatchEvent(vcchevent);
       
diff --git a/dev/js/src/view/corpstatv.js b/dev/js/src/view/corpstatv.js
index ee65c03..fa9a135 100644
--- a/dev/js/src/view/corpstatv.js
+++ b/dev/js/src/view/corpstatv.js
@@ -122,6 +122,7 @@
        if(newString.startsWith('(')){
          newString = newString.slice(1, newString.length-1);
        }
+       
        if(newString != oldString) {
         this.disableStat();
       }  
