diff --git a/templates/index.html.ep b/templates/index.html.ep
index 139ada8..c5d993c 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -34,6 +34,12 @@
      if (plainTitle.match(/-en/)) {
        korapPath="/instance/english";
      }
+     var korapVC="";
+     if (plainTitle.match(/WUDD/i)) {
+       korapVC="&collection=corpusSigle+%3D+%2FW%5BDU%5DD17%2F";
+       korapPath="/instance/test";
+     }
+     
      $(document).ready(function() {
 
        $('#firstable').hide();
@@ -99,7 +105,7 @@
          for (var i=0, l=txt.length; i<l; i++) {
            newText += (i == 5 ? txt.charAt(i) : '<a href="http://korap.ids-mannheim.de' + korapPath + '/?ql=cosmas2&q=' +
                                                 CIIsearchWords + ' /' +  (i > 5? '%2B' : '-') + 'w' +
-                                                Math.abs(i-5) + ':' +  Math.abs(i-5) + ' ' + word +
+                                                Math.abs(i-5) + ':' +  Math.abs(i-5) + ' ' + word + korapVC +
                                                 '" target="korap"><span style="background-color:' +
                                                 getHeatColor(heat[i]/maxHeat)+'">'+txt.charAt(i)+'</span></a>');
          }
@@ -182,7 +188,9 @@
        var collocatorData = <%= b(Mojo::JSON::to_json($collocators)) %>;
        var maxHeat; // = Math.max.apply(Math,collocatorData.map(function(o){return o.cprob;}))
 
-       vocabDistanceTable = makeVocabDistanceTable("#vocabdistt", baseURL);
+       if(data.mergedEnd > 0) {
+          vocabDistanceTable = makeVocabDistanceTable("#vocabdistt", baseURL);
+       }
 
        if (collocatorData != null) {
          maxHeat = Math.max.apply(Math,collocatorData.map(function(o){return Math.max.apply(Math,o.heat);}))
@@ -445,8 +453,8 @@
             T.Y[i][0] = (d.x - mapWidth/2 - tx)/ss/20;
             T.Y[i][1] = (d.y - mapHeight/2 - ty)/ss/20;
             return "translate(" +
-                                                                                    (d.x) + "," +
-                                                                                    (d.y) + ")";
+                                                                                     (d.x) + "," +
+                                                                                     (d.y) + ")";
           });
      }
 
@@ -456,8 +464,8 @@
           .data(data.words)
           .attr("transform", function(d, i) {
             return "translate(" +
-                                                                                     ((Y[i][0]*20*ss + tx) + mapWidth/2) + "," +
-                                                                                     ((Y[i][1]*20*ss + ty) + mapHeight/2) + ")"; });
+                                                                                      ((Y[i][0]*20*ss + tx) + mapWidth/2) + "," +
+                                                                                      ((Y[i][1]*20*ss + ty) + mapHeight/2) + ")"; });
      }
 
      var svg;
@@ -665,11 +673,11 @@
      }
 
      function queryKorAP() {
-       window.open('http://korap.ids-mannheim.de' + korapPath + '?q='+queryword.value, 'KorAP');
+       window.open('http://korap.ids-mannheim.de' + korapPath + '?q='+queryword.value+korapVC, 'KorAP');
      }
 
      function queryKorAPCII(query) {
-       window.open('http://korap.ids-mannheim.de' +korapPath + '?ql=cosmas2&q='+query, 'KorAP');
+       window.open('http://korap.ids-mannheim.de' +korapPath + '?ql=cosmas2&q='+query+korapVC, 'KorAP');
      }
     </script>
   </head>
