diff --git a/dev/js/spec/pluginSpec.js b/dev/js/spec/pluginSpec.js
index 6dd31b3..e3da71e 100644
--- a/dev/js/spec/pluginSpec.js
+++ b/dev/js/spec/pluginSpec.js
@@ -742,6 +742,44 @@
       document.body.removeChild(f);
     });
 
+    it('should send messages', function () {
+      let qel = document.createElement('input');
+      qel.setAttribute('id','q-field');
+
+      let qlel = document.createElement('select');
+      qlel.setAttribute('id','ql-field');
+      qlel.innerHTML = '<option value="poliqarp">Poliqarp</option><option value="cosmas2">Cosmas II</option><option value="annis">Annis QL</option><option value="cqp">CQP (neu)</option><option value="cql">CQL v1.2</option><option value="fcsql">FCSQL</option>';
+
+      document.body.appendChild(qel);
+      document.body.appendChild(qlel);
+
+      var manager = pluginServerClass.create();
+      var id = manager.addService({"name":'Example 1', "src":'about:blank'});
+      expect(id).toMatch(/^id-/);
+      
+      let data = {
+        "originID" : id,
+        "action" : "set",
+        "key" : "QueryForm",
+        "value" : {
+          "q" : "test3",
+          "ql" : "cosmas2"
+        }
+      };
+
+      manager._receiveMsg({
+        "data" : data
+      });
+      manager.destroy();
+      expect(qel.value).toEqual("test3");
+      expect(qlel.value).toEqual("cosmas2");
+      // Recreate initial state
+
+      qel.remove();
+      qlel.remove();
+    });
+
+    
     it('should reply to query information requests (pagination)', function () {
       var manager = pluginServerClass.create();
       var id = manager.addService({"name":'Service', "src":'about:blank'});
diff --git a/dev/js/src/plugin/server.js b/dev/js/src/plugin/server.js
index b47e75c..76d1a0e 100644
--- a/dev/js/src/plugin/server.js
+++ b/dev/js/src/plugin/server.js
@@ -555,24 +555,27 @@
         break;
 
       case 'set':
-
-        // Get Query information from form
+        
+        // Get Query information from data
         if (d.key == 'QueryForm') {
           let v = d["value"];
+
           if (v["q"] != undefined && this._q) {
             this._q.value = v["q"];
           };
 
           // Set query language field
           // Identical to tutorial.js
-          if (v[ql] != undefined && KorAP.QLmenu) {
-            KorAP.QLmenu.selectValue(ql);
-          }
+          if (v["ql"] != undefined) {
+            if (KorAP.QLmenu) {
+              KorAP.QLmenu.selectValue(v["ql"]);
+            }
 
-          else if (this._ql) {
-            let found = Array.from(this._ql.options).find(o => o.value === ql);
-            if (found)
-              found.selected = true;
+            else if (this._ql) {
+              let found = Array.from(this._ql.options).find(o => o.value === v["ql"]);
+              if (found)
+                found.selected = true;
+            };
           };
 
           window.scrollTo(0, 0);
