diff --git a/dev/js/spec/statSpec.js b/dev/js/spec/statSpec.js
index 2edc972..aefe187 100644
--- a/dev/js/spec/statSpec.js
+++ b/dev/js/spec/statSpec.js
@@ -76,8 +76,7 @@
   	return cb(preDefinedStat);
   	}; 
   	
- 
-  	
+ 	
 	describe('KorAP.CorpusStat', function(){
 	   
 		var vc = vcClass.create([
@@ -92,13 +91,7 @@
 		var stat = statClass.create(preDefinedStat);
 		var descL = stat.element();
 		
-		it('statButton should only be added if doc is specified', function(){
-			expect(vcEl.children[1].id).not.toBe(null);	
-			vc2 = vcClass.create().fromJson();
-			expect(vc2.element().children[1]).toBeUndefined();	
-		});
-
-		
+			
 		it('should be initiable', function(){
 			expect(stat._visibleStat).toEqual(false);
 	    expect( function() { statClass.create() }).toThrow(new Error("Missing parameter"));
diff --git a/dev/js/src/vc.js b/dev/js/src/vc.js
index 6941341..05e48ad 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -65,7 +65,8 @@
   // KorAP._validDateMatchRE is defined in datepicker.js!
 
   const loc = KorAP.Locale;
-  loc.VC_SHOWSTAT = loc.VC_SHOWSTAT || 'Corpus Statistic';
+  loc.SHOWSTAT = loc.SHOWSTAT || 'Statistics';
+  loc.VERB_SHOWSTAT = loc.VERB_SHOWSTAT || 'Corpus Statistics';
   
   KorAP._vcKeyMenu = undefined;
   KorAP._vcDatePicker = dpClass.create();
@@ -264,10 +265,8 @@
       this._element.appendChild(this._root.element());
       
      //Add corpus statistic button
-     if(!(this._root.element().classList.contains('unspecified'))){
      	this.addStatBut();
-     }
-    
+ 
       return this._element;
     },
 
@@ -345,11 +344,11 @@
       
       //add button      
       var bu = dv.addE('div');
-      bu.classList.add('bottom', 'button-single');
+      bu.classList.add('bottom', 'button-stat');
       var stat = bu.addE('span');
-      stat.addT('Statistics');
+      stat.addT(loc.SHOWSTAT);
       //localize the buttons title attribute
-      stat.setAttribute('title', loc.VC_SHOWSTAT);
+      //stat.setAttribute('title', loc.SHOWSTAT);
       stat.classList.add('statistic');
       
       /* 
diff --git a/dev/js/src/vc/statistic.js b/dev/js/src/vc/statistic.js
index a5a2f02..4a40ea5 100644
--- a/dev/js/src/vc/statistic.js
+++ b/dev/js/src/vc/statistic.js
@@ -42,10 +42,10 @@
 			if (this._element !== undefined) {
 	      return this._element;
       };
-      
-      //create HTML Description List Element
-			var statDL = document.createElement('dl');
-			var statistic = this._statistic;
+   
+      //create HTML Description List Element	
+      var statDL = document.createElement('dl');
+		  var statistic = this._statistic;
 			
 			var keys = Object.keys(statistic);
 			for(i = 0; i <  keys.length; i++){
@@ -81,6 +81,14 @@
 						cb(null);
 						return;
 					}
+					
+					//catches notifications
+					if(statResponse["notifications"] !== null && statResponse["notifications"] !== undefined ){
+						notif = statResponse["notifications"];
+						KorAP.log(0, notif[0][1]);
+						return;
+					}
+					
 					cb(statResponse);
 				});
 			}
@@ -123,12 +131,6 @@
 				
 			statTable.classList.remove('loading');
 			statisticobj = that.create(statistic);
-			
-			//Removes statistic button when statistic is displayed
-			if(document.getElementById('dCorpStat') !== null){
-				var divStatButton = document.getElementById('dCorpStat');
-				divStatButton.parentNode.removeChild(divStatButton);
-			}
       
 			statTable.appendChild(statisticobj.element());
 			
@@ -142,7 +144,6 @@
 			b.addEventListener('click', function (e){
 				statTable.parentNode.removeChild(statTable);
 				that._visibleStat = false;
-				vc.addStatBut();
 				e.halt();
 				});
 			});
