diff --git a/dev/js/src/api.js b/dev/js/src/api.js
index 5295b3c..5b30870 100644
--- a/dev/js/src/api.js
+++ b/dev/js/src/api.js
@@ -41,9 +41,9 @@
     if (param['spans'] == true) {
       url += '?spans=true';
       if (param['foundry'] !== undefined)
-	url += '&foundry=' + param['foundry'];
+	      url += '&foundry=' + param['foundry'];
       if (param['layer'] !== undefined)
-	url += '&layer=' + param['layer'];
+	      url += '&layer=' + param['layer'];
     }
     
     // { spans : false, layer: [Array of KorAP.InfoLayer] }
@@ -67,7 +67,6 @@
    */
   KorAP.API.getJSON = function (url, onload) {
     var req = new XMLHttpRequest();
-
     req.open("GET", url, true);
     req.setRequestHeader("Accept", "application/json");
     req.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); 
@@ -81,17 +80,23 @@
 	4 - done
       */
       if (this.readyState == 4) {
-	if (this.status === 200) {
-	  var json = JSON.parse(this.responseText);
-	  if (json["errors"] !== null) {
-	    for (var i in json["errors"]) {
-	      KorAP.log(json["errors"][i][0], json["errors"][i][1]);
-	    };
-	  };
-	  onload(json);
-	}
-	else
-	  KorAP.log(this.status, this.statusText);
+
+        var json = JSON.parse(this.responseText);
+	      if (json !== null && json["errors"] !== null) {
+	        for (var i in json["errors"]) {
+	          KorAP.log(json["errors"][i][0], json["errors"][i][1] || "Unknown");
+	        };
+	      }
+        else if (this.status !== 200) {
+        	KorAP.log(this.status, this.statusText);
+        };
+
+	      if (this.status === 200) {
+	        onload(json);
+	      }
+	      else {
+          onload(undefined);
+        };
       }
     };
     req.ontimeout = function () {
diff --git a/dev/js/src/match/info.js b/dev/js/src/match/info.js
index ab72778..743fa2c 100644
--- a/dev/js/src/match/info.js
+++ b/dev/js/src/match/info.js
@@ -114,6 +114,9 @@
 	      // Callback for retrieval
 	      function (matchResponse) {
 
+          if (matchResponse === undefined)
+            cb(null);
+
 	        // Get snippet from match info
 	        if (matchResponse["snippet"] !== undefined) {
 	          this._table = matchTableClass.create(matchResponse["snippet"]);
@@ -270,9 +273,9 @@
       this.getTable(undefined, function (table) {
 
 	      if (table !== null) {
-	        matchtable.classList.remove('loading');
           matchtable.appendChild(table.element());
 	      };
+	      matchtable.classList.remove('loading');
       });
 
       // Get spans
