diff --git a/css/derekovecs.css b/css/derekovecs.css
index d31bce1..5f4015e 100644
--- a/css/derekovecs.css
+++ b/css/derekovecs.css
@@ -77,8 +77,7 @@
 }
 
 a.target {
-    color: red;
-    fill: red;
+    font-weight: bold;
 }
 
 table.display {
diff --git a/templates/index.html.ep b/templates/index.html.ep
index 4745c90..32c8a07 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -123,7 +123,7 @@
            nranks = nranks.concat(paraResults[i].map(function(a){return a.rank;}));
            nmarked = nmarked.concat(paraResults[i].map(function(a){return a.marked;}));
          }
-         showMap({target: " "+urlParams.get('word')+" ", mergedEnd: 0, words: nwords, vecs: nvecs, ranks: nranks, marked: nmarked} );
+         showMap({target: " "+urlParams.get('word')+" ", mergedEnd: <%= $mergedEnd %>, words: nwords, vecs: nvecs, ranks: nranks, marked: nmarked} );
          var t = $('#firsttable').DataTable({
            data: paraResults[0],
            "sScrollY": "780px",
@@ -139,7 +139,9 @@
            "columns": [
              { "data": "rank", type: "allnumeric" },
              { "data": "dist",  render: function ( data, type, row ) {return data.toFixed(3) }},
-             { "data": "word",  class: "paradigmator", render: function ( data, type, row ) {urlprefix.set("word", data); return  '<a href="?' + urlprefix + '">' + data + '</a>' }}
+             { "data": "word",  class: "paradigmator", render: function ( data, type, row ) {
+               urlprefix.set("word", data); return  '<a class="' + getMergedClass(row.rank) + '" href="?' + urlprefix + '">' + data + '</a>' 
+             }}
            ],
            "columnDefs": [
              { className: "dt-right", "targets": [0,1] },
@@ -498,6 +500,26 @@
      var anchor_array = [];
      var text;
 
+     function getMergedClass(i) {
+       if(data.mergedEnd && i > data.mergedEnd) {
+         return " merged"
+       } else {
+         return "";
+       }
+     }
+
+     function getRankTooltip(i) {
+       if(data.mergedEnd) {
+         if(data.ranks[i] < data.mergedEnd) {
+           return "rank: "+i +"  "+"freq. rank: "+(data.ranks[i]).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
+         } else {
+           return "rank: "+i +"  "+"freq. rank: "+(data.ranks[i]-data.mergedEnd).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " (merged vocab)";
+         }
+       } else {
+         return "rank: "+i +"  "+"freq. rank: "+data.ranks[i].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
+       }
+     }
+
      function drawEmbedding() {
        var urlprefix =  new URLSearchParams(window.location.search);
        urlprefix.delete("word");
@@ -527,23 +549,16 @@
             res="marked ";
           }
           if(data.target.indexOf(" "+d+" ") >= 0) {
-            return res+"target";
-          } else if(data.ranks[i] < data.mergedEnd) {
-            return res+"merged";
+            res += "target";
+          } 
+          if(data.mergedEnd && data.ranks[i] >= data.mergedEnd) {
+            return res+" merged";
           } else {
             return res;
           }
         })
         .attr("title", function(d, i) {
-          if(data.mergedEnd > 0) {
-            if(data.ranks[i] >= data.mergedEnd) {
-              return "rank: "+i +"  "+"freq. rank: "+(data.ranks[i]).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
-            } else {
-              return "rank: "+i +"  "+"freq. rank: "+data.ranks[i].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " (merged vocab)";
-            }
-          } else {
-            return "rank: "+i +"  "+"freq. rank: "+data.ranks[i].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
-          }
+          return getRankTooltip(i);
         })
         .append("text")
         .attr("text-anchor", "top")
@@ -552,7 +567,7 @@
 
        g.append("svg:title")
         .text(function(d, i) {
-		      return "distance rank: "+ i +"  "+"\nfrequency rank: "+data.ranks[i].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
+		      return getRankTooltip(i);
 	      });
 
        var zoomListener = d3.behavior.zoom()
@@ -674,7 +689,7 @@
          $.post('/derekovecs/getVecsByRanks',
                 JSON.stringify(nranks),
                 function(data, status){
-                  showMap({target: " "+urlParams.get('word')+" ", mergedEnd: 0, words: nwords, vecs: data, ranks: nranks, marked: Array(100).fill(false)} );
+                  showMap({target: " "+urlParams.get('word')+" ", mergedEnd: <%= $mergedEnd %>, words: nwords, vecs: data, ranks: nranks, marked: Array(100).fill(false)} );
                 }, 'json');
        }
      }
diff --git a/w2v-server.pl b/w2v-server.pl
index f29a70a..d72aff8 100755
--- a/w2v-server.pl
+++ b/w2v-server.pl
@@ -731,22 +731,33 @@
 
 	while (1) {
 		st[cn][b] = st1[c];
+    if(merge_words > 0)
+      st[cn+1][b] = st1[c];
 		b++;
 		c++;
 		st[cn][b] = 0;
 		if (st1[c] == 0) break;
 		if (st1[c] == ' ' || st1[c] == '-') {
       sep[cn++] = st1[c];
+      if(merge_words > 0)
+        sep[cn++] = st1[c];
 			b = 0;
 			c++;
 		}
 	}
 	cn++;
+  if(merge_words > 0)
+    cn++;
 	for (a = 0; a < cn; a++) {
 		if(search_backw) {
 			for (b = words - 1; b >= 0; b--) if (!strcmp(&vocab[b * max_w], st[a])) break;
 		}  else {
-			for (b = 0; b < words; b++) if (!strcmp(&vocab[b * max_w], st[a])) break;
+			for (b = 0; b < words; b++) 
+        if (!strcmp(&vocab[b * max_w], st[a])) {
+          if(merge_words > 0)
+            search_backw^=1;
+          break;
+        }
 		}
 		if (b == words) b = -1;
 		wl->wordi[a] = b;
