diff --git a/dev/js/spec/vcSpec.js b/dev/js/spec/vcSpec.js
index 8e745e1..ae62f10 100644
--- a/dev/js/spec/vcSpec.js
+++ b/dev/js/spec/vcSpec.js
@@ -625,7 +625,7 @@
       expect(docGroup.getOperand(1).key("name")).not.toBeNull();
       expect(docGroup.getOperand(1).ldType()).toEqual("doc");
       expect(docGroup.getOperand(1).key()).toEqual("name");
-      expect(docGroup.getOperand(1).value()).toEqual("");
+      expect(docGroup.getOperand(1).value()).toBeUndefined();
 
       op = docGroup.getOperand(1).element().lastChild;
       expect(op.getAttribute('class')).toEqual('operators button-group');
@@ -664,6 +664,21 @@
       expect(op.children[2].getAttribute('class')).toEqual('delete');
       expect(op.children.length).toEqual(3);
     });
+
+    it('should be clickable', function () {
+      var vc = vcClass.create([
+        ["pubDate", "date"]
+      ]);
+      expect(vc.toQuery()).toEqual("");
+      expect(vc.element().firstChild.textContent).toEqual("⋯");
+      vc.element().firstChild.firstChild.click();
+
+      // Click on pubDate
+      vc.element().firstChild.getElementsByTagName("LI")[0].click();
+
+      expect(vc.element().firstChild.firstChild.textContent).toEqual("pubDate");
+      expect(vc.element().firstChild.children[1].getAttribute("data-type")).toEqual("date");
+    });    
   });
 
   describe('KorAP.Doc element', function () {
diff --git a/dev/js/src/menu.js b/dev/js/src/menu.js
index b2ec25b..9f3cf75 100644
--- a/dev/js/src/menu.js
+++ b/dev/js/src/menu.js
@@ -782,6 +782,8 @@
 
     // Set boundary for viewport
     _boundary : function (bool) {
+      if (this._list.length === 0)
+        return;
       this.item(this._list[0]).noMore(bool);
       this.item(this._list[this._list.length - 1]).noMore(bool);
     },
diff --git a/dev/js/src/vc/doc.js b/dev/js/src/vc/doc.js
index 41b72ad..bdedb70 100644
--- a/dev/js/src/vc/doc.js
+++ b/dev/js/src/vc/doc.js
@@ -34,6 +34,10 @@
           upgradeTo(this).
           fromJson(json);
 
+      if (obj === undefined) {
+        console.log(json);
+      };
+
       // Bind the parent
       if (parent !== undefined)
         obj._parent = parent;
@@ -209,6 +213,7 @@
           // Check the VC list if the field is known
           var type = KorAP._vcKeyMenu.typeOf(this.key());
           if (type != undefined) {
+            console.log("Guessed the type for " + this.key() + " to be " + type);
             json["type"] = "type:" + type;
           };
         };
diff --git a/dev/js/src/vc/unspecified.js b/dev/js/src/vc/unspecified.js
index 0395685..56d0869 100644
--- a/dev/js/src/vc/unspecified.js
+++ b/dev/js/src/vc/unspecified.js
@@ -41,12 +41,9 @@
 	      return null;
 
       // Set JSON-LD type
-      var newDoc = docClass.create(this._parent, {
-	      "@type" : "koral:doc",
-	      "value" : "",
-	      "key"   : v
-      });
-
+      var newDoc = docClass.create(this._parent);
+      newDoc.key(v);
+  
       // Unspecified document on root
       if (this._parent.ldType() === null) {
 	      this._parent.root(newDoc);
@@ -120,6 +117,7 @@
 
       // Get the key menu
       var menu = KorAP._vcKeyMenu;
+
       // Add key menu element at the correct position
       this._element.insertBefore(
 	      menu.element(),	
