diff --git a/w2v-server.pl b/w2v-server.pl
index ec33052..5a24fdb 100644
--- a/w2v-server.pl
+++ b/w2v-server.pl
@@ -420,8 +420,7 @@
 SV *get_neighbours(char *st1, int N) {
   HV *result = newHV();
 	float bestd[MAX_NEIGHBOURS], bestn[MAX_NEIGHBOURS], vec[max_size];
-	long long besti[MAX_NEIGHBOURS], bestp[MAX_NEIGHBOURS], a, b, c, d, slice;
-	char *bestw[MAX_NEIGHBOURS];
+	long besti[MAX_NEIGHBOURS], bestp[MAX_NEIGHBOURS], a, b, c, d, slice;
 	knn *para_nbs[MAX_THREADS];
 	knn *syn_nbs[MAX_THREADS];
 	knnpars pars[MAX_THREADS];
@@ -486,12 +485,8 @@
 
   AV* array = newAV();
   for (a = 0; a < N; a++) {
-    bestw[a] = (char *)malloc(max_size * sizeof(char));
-  }
-  for (a = 0; a < N; a++) {
-    strcpy(bestw[a], &vocab[besti[a] * max_w]);
     HV* hash = newHV();
-    SV* word = newSVpvf(bestw[a], 0);
+    SV* word = newSVpvf(&vocab[besti[a] * max_w], 0);
     if(latin_enc == 0) SvUTF8_on(word);
     hv_store(hash, "word", strlen("word"), word , 0);
     hv_store(hash, "dist", strlen("dist"), newSVnv(bestd[a]), 0);
@@ -505,13 +500,21 @@
   }
   hv_store(result, "paradigmatic", strlen("paradigmatic"), newRV_noinc((SV*)array), 0);
   
+  for(b=0; b < MAX_NEIGHBOURS; b++) {
+    besti[b] = -1L;
+    bestd[b] = 0;
+    bestn[b] = 0;
+    bestp[b] = 0;
+  }
+
   printf("Waiting for syn threads to join\n");
   fflush(stdout);
   for (a = 0; a < syn_threads; a++) pthread_join(pt[a+para_threads], &syn_nbs[a]);
   printf("syn threads joint\n");
   fflush(stdout);
   
-  for(b=0; b < N; b++) {
+
+  for(b=0; b < syn_nbs[0]->length; b++) {
     besti[b] = syn_nbs[0]->index[b];
     bestd[b] = syn_nbs[0]->dist[b];
     bestn[b] = syn_nbs[0]->norm[b];
@@ -520,8 +523,8 @@
   
   
   for(a=1; a < syn_threads; a++) {
-    for(b=0; b < N; b++) {
-      for(c=0; c < N; c++) {
+    for(b=0; b < syn_nbs[a]->length; b++) {
+      for(c=0; c < MAX_NEIGHBOURS; c++) {
         if(syn_nbs[a]->dist[b] > bestd[c]) {
           for(d=N-1; d>c; d--) {
             bestd[d] = bestd[d-1];
@@ -539,10 +542,9 @@
     }
   }
   array = newAV();
-  for (a = 0; a < N && besti[a] >= 0; a++) {
-    strcpy(bestw[a], &vocab[besti[a] * max_w]);
+  for (a = 0; a < MAX_NEIGHBOURS && besti[a] >= 0; a++) {
     HV* hash = newHV();
-    SV* word = newSVpvf(bestw[a], 0);
+    SV* word = newSVpvf(&vocab[besti[a] * max_w], 0);
     if(latin_enc == 0) SvUTF8_on(word);
     hv_store(hash, "word", strlen("word"), word , 0);
     hv_store(hash, "dist", strlen("dist"), newSVnv(bestd[a]), 0);
@@ -841,17 +843,20 @@
 				<th align="right">#</th><th align="right">cos</th><th align="left">paradigmatic</th><th title="Position in winodw around target word. Absolute value can be too low because of sub-sampling frequent words.">@</th><th align="right" title="&#34;Responsivenes&#34; of the collocator at the relative position @. Approximation of the probability that the combination of the target word and the collocator at the relative position @ come from the corpus.">resp.</th><th title="Probability of the collocator at window location @."align="right">p(c<sub><small>@</small></sub>)</th><th align="left">syntagmatic</th>
 			</tr>
 			% my $j=0; my @words; my @vecs; my @ranks; for my $list (@$lists) {
-			% my $i=0; for my $item (@$list) {
-      % my $c = (@$collocators)[$i];      
-			% if(!grep{$_ eq $item->{word}} @words) {
-      %   push @vecs, $item->{vector};
-			%   push @words, $item->{word};
-			%   push @ranks, $item->{rank};
-      % }
+			% my $i=0; while(1) {
+      % my $item = (@$list)[$i];
+      % my $c = (@$collocators)[$i];
+      % last if(!$c && !$item);
 			<tr>
 				<td align="right">
   				<%= ++$i %>.
 				</td>
+        % if($item) {
+			  % if(!grep{$_ eq $item->{word}} @words) {
+        %   push @vecs, $item->{vector};
+			  %   push @words, $item->{word};
+			  %   push @ranks, $item->{rank};
+        % }
 				<td align="right">
   				<%= sprintf("%.3f", $item->{dist}) %>
 				</td>
@@ -860,6 +865,9 @@
 						<%= $item->{word} %>
 					</a>
 				</td>
+        % } else {
+          <td colspan="2"/>
+        % }
         % if($c) {
 				<td align="right">
           <%= $c->{pos} %>:
