diff --git a/dev/js/spec/vcSpec.js b/dev/js/spec/vcSpec.js
index 66183f4..c08307d 100644
--- a/dev/js/spec/vcSpec.js
+++ b/dev/js/spec/vcSpec.js
@@ -1214,8 +1214,155 @@
         'Titel = "Baum" | Veröffentlichungsort = "hihi" | Untertitel ~ "huhu"'
       );
     });
+
+    it('should be deserializable from collection 1', function () {
+      var kq = {
+        "matches":["..."],
+        "collection":{
+          "@type": "koral:docGroup",
+          "operation": "operation:or",
+          "operands": [{
+            "@type": "koral:docGroup",
+            "operation": "operation:and",
+            "operands": [
+              {
+                "@type": "koral:doc",
+                "key": "title",
+                "match": "match:eq",
+                "value": "Der Birnbaum",
+                "type": "type:string"
+              },
+              {
+                "@type": "koral:doc",
+                "key": "pubPlace",
+                "match": "match:eq",
+                "value": "Mannheim",
+                "type": "type:string"
+              },
+              {
+                "@type": "koral:docGroup",
+                "operation": "operation:or",
+                "operands": [
+                  {
+                    "@type": "koral:doc",
+                    "key": "subTitle",
+                    "match": "match:eq",
+                    "value": "Aufzucht und Pflege",
+                    "type": "type:string"
+                  },
+                  {
+                    "@type": "koral:doc",
+                    "key": "subTitle",
+                    "match": "match:eq",
+                    "value": "Gedichte",
+                    "type": "type:string"
+                  }
+                ]
+              }
+            ]
+          },{
+            "@type": "koral:doc",
+            "key": "pubDate",
+            "match": "match:geq",
+            "value": "2015-03-05",
+            "type": "type:date",
+            "rewrites" : [{
+	            "@type" : "koral:rewrite",
+	            "operation" : "operation:modification",
+	            "src" : "querySerializer",
+	            "scope" : "tree"
+            }]
+          }]
+        }
+      };
+      
+      var vc = vcClass.create().fromJson(kq["collection"]);
+      expect(vc.toQuery()).toEqual('(title = "Der Birnbaum" & pubPlace = "Mannheim" & (subTitle = "Aufzucht und Pflege" | subTitle = "Gedichte")) | pubDate since 2015-03-05');
+    });
+
+    it('should be deserializable from collection 2', function () {
+      var kq = {
+        "@context": "http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld",
+        "meta": {},
+        "query": {
+          "@type": "koral:token",
+          "wrap": {
+            "@type": "koral:term",
+            "match": "match:eq",
+            "layer": "orth",
+            "key": "Baum",
+            "foundry": "opennlp",
+            "rewrites": [
+              {
+                "@type": "koral:rewrite",
+                "src": "Kustvakt",
+                "operation": "operation:injection",
+                "scope": "foundry"
+              }
+            ]
+          },
+          "idn": "Baum_2227",
+          "rewrites": [
+            {
+              "@type": "koral:rewrite",
+              "src": "Kustvakt",
+              "operation": "operation:injection",
+              "scope": "idn"
+            }
+          ]
+        },
+        "collection": {
+          "@type": "koral:docGroup",
+          "operation": "operation:and",
+          "operands": [
+            {
+              "@type": "koral:doc",
+              "match": "match:eq",
+              "type": "type:regex",
+              "value": "CC-BY.*",
+              "key": "availability"
+            },
+            {
+              "@type": "koral:doc",
+              "match": "match:eq",
+              "type":"type:text",
+              "value": "Goethe",
+              "key": "author"
+            }
+          ],
+          "rewrites": [
+            {
+              "@type": "koral:rewrite",
+              "src": "Kustvakt",
+              "operation": "operation:insertion",
+              "scope": "availability(FREE)"
+            }
+          ]
+        },
+        "matches": []
+      };
+
+      var vc = vcClass.create().fromJson(kq["collection"]);
+      expect(vc.toQuery()).toEqual('availability = /CC-BY.*/ & author = "Goethe"');
+    });
   });
 
+  it('shouldn\'t be deserializable from collection with unknown type', function () {
+    var kq = {
+      "@type" : "koral:doc",
+      "match": "match:eq",
+      "type":"type:failure",
+      "value": "Goethe",
+      "key": "author"
+    };
+
+    expect(function () {
+      vcClass.create().fromJson(kq)
+    }).toThrow(new Error("Unknown value type: string"));
+
+  });
+
+
   describe('KorAP.Operators', function () {
     it('should be initializable', function () {
       var op = operatorsClass.create(true, false, false);
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index b9822fd..f7a136c 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -359,9 +359,15 @@
 // Render Virtual collection
 function _getCurrentVC (vcClass, vcArray) {
   var vc = vcClass.create(vcArray);
-  if (KorAP.koralQuery !== undefined && KorAP.koralQuery["collection"]) {
-    vc.fromJson(KorAP.koralQuery["collection"]);
-  };
+  try {
+    if (KorAP.koralQuery !== undefined && KorAP.koralQuery["collection"]) {
+      vc.fromJson(KorAP.koralQuery["collection"]);
+    };
+  }
+  catch (e) {
+    KorAP.log(0, e);
+    return;
+  }
   return vc;
 };
 
diff --git a/dev/js/src/vc.js b/dev/js/src/vc.js
index 527e116..8a5c6b8 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -316,18 +316,9 @@
           var that = this;
           var actions = panel.actions;
           var statView;
-          
-          //delete log after solving the cq= -Problem.
-          console.log("vc._root.element() = " + that._root.element().innerHTML);
-          console.log("vc._root.toQuery = " + that._root.toQuery());
-          
+                    
           actions.add(loc.SHOW_STAT, [ 'statistic' ], function() {
             if (statView === undefined || !statView.shown()) {
-             
-              //delete log after solving the cq= -Problem
-              console.log("statView created mit vc.toQuery()= "
-                  + that.toQuery());
-             
               statView = corpStatVClass.create(that);
               panel.add(statView);
             }
diff --git a/dev/js/src/vc/doc.js b/dev/js/src/vc/doc.js
index d2a413e..15c7287 100644
--- a/dev/js/src/vc/doc.js
+++ b/dev/js/src/vc/doc.js
@@ -9,8 +9,14 @@
   'util'
 ], function (jsonldClass, rewriteListClass, stringValClass) {
 
+  /*
+   * TODO:
+   *   Improve error handling by using window.onerror() to
+   *   capture thrown errors and log them.
+   */
 
   const errstr802 = "Match type is not supported by value type";
+  const errstr804 = "Unknown value type";
   const loc = KorAP.Locale;
   loc.EMPTY = loc.EMPTY || '⋯';
 
@@ -319,8 +325,8 @@
         }
 
         else {
-          KorAP.log(804, "Unknown value type");
-          return;
+          KorAP.log(804, errstr804 + ": " + this.type());
+          throw new Error(errstr804 + ": " + this.type());
         };
       };
 
@@ -622,13 +628,11 @@
       switch (this.type()) {
       case "date":
         return string + this.value();
-        break;
       case "regex":
         return string + '/' + this.value().escapeRegex() + '/';
-        break;
       case "string":
+      case "text":
         return string + '"' + this.value().quote() + '"';
-        break;
       };
 
       return "";
