cleanup code

Change-Id: I93aa205581f046ce7a4a5129fc1ea8033126a829
diff --git a/dev/js/src/vc/statistic.js b/dev/js/src/vc/statistic.js
index 4a40ea5..5407e8f 100644
--- a/dev/js/src/vc/statistic.js
+++ b/dev/js/src/vc/statistic.js
@@ -69,7 +69,12 @@
 		 */			
 		getStatistic : function(vc, cb){
 			//cq = corpusQuery
-			var cq = encodeURI(vc.toQuery());
+			
+			//console.log("HK ld-Type corpus = " +  vc.getLdType());
+			
+			var cq;
+			
+			cq = encodeURI(vc.toQuery());
 			
 			try{	
 				KorAP.API.getCorpStat(cq, function(statResponse){
@@ -86,6 +91,7 @@
 					if(statResponse["notifications"] !== null && statResponse["notifications"] !== undefined ){
 						notif = statResponse["notifications"];
 						KorAP.log(0, notif[0][1]);
+						cb(null);
 						return;
 					}
 					
@@ -125,13 +131,13 @@
 			* append result to statTable 
 			*/
 			this.getStatistic(vc, function (statistic) {
+
+			statTable.classList.remove('loading');
+			statisticobj = that.create(statistic);
 			
 			if (statistic === null)
 				return; 
-				
-			statTable.classList.remove('loading');
-			statisticobj = that.create(statistic);
-      
+			
 			statTable.appendChild(statisticobj.element());
 			
 			// Add Close Button