diff --git a/w2v-server.pl b/w2v-server.pl
index b288580..2605db5 100755
--- a/w2v-server.pl
+++ b/w2v-server.pl
@@ -594,7 +594,7 @@
   pars->N = (number? number : 20);
   pars->from = 0;
   pars->upto = window * 2 -1;
-  knn *syn_nbs; // = (knn*) getCollocators(pars);
+  knn *syn_nbs = NULL; // = (knn*) getCollocators(pars);
   free(pars);
   free(window_sums);
   free(target_sums);
@@ -610,14 +610,16 @@
   long window_layer_size = size * window * 2;
 	long a, b, c, d, e, window_offset, target, max_target=0, maxmax_target;
 	float f, max_f, maxmax_f;
-	float *target_sums, worstbest, wpos_sum;
+	float *target_sums=NULL, worstbest, wpos_sum;
 	collocator *best;
 
   if(M2 == NULL || cc == -1)
     return NULL;
 
 	a = posix_memalign((void **) &target_sums, 128, pars->cutoff * sizeof(float));
-	best = malloc(N * sizeof(collocator));
+  memset(target_sums, 0, pars->cutoff * sizeof(float));
+	best = malloc((N>200?N:200) * sizeof(collocator));
+  memset(best, 0, (N>200?N:200) * sizeof(collocator));
   worstbest = MIN_RESP;
 
   for (b = 0; b < pars->cutoff; b++)
@@ -905,7 +907,7 @@
 
 SV *get_neighbours(char *st1, int N, int sort_by, int search_backw, long cutoff, int dedupe, int no_similar_profiles) {
   HV *result = newHV();
-	float *target_sums, vec[max_size];
+	float *target_sums=NULL, vec[max_size];
 	long long old_words;
 	long a, b, c, d, slice;
 	knn *para_nbs[MAX_THREADS];
@@ -916,9 +918,9 @@
   int syn_threads = (M2? window * 2 : 0);
   int para_threads = (no_similar_profiles? 0 : num_threads - syn_threads);
 
-  collocator *best;
-  posix_memalign((void **) &best, 128, 10 * (N>=100? N : 100)  * sizeof(collocator));
-  memset(best, 0, 10 * N * sizeof(collocator));
+  collocator *best = NULL;
+  posix_memalign((void **) &best, 128, 10 * (N>=200? N : 200)  * sizeof(collocator));
+  memset(best, 0, (N>=200? N : 200) * sizeof(collocator));
 
   if(N>MAX_NEIGHBOURS) N=MAX_NEIGHBOURS;
 	
@@ -933,8 +935,7 @@
 	slice = cutoff / para_threads;
 
 	a = posix_memalign((void **) &target_sums, 128, cutoff * sizeof(float));
-  for(a = 0; a < cutoff; a++)
-    target_sums[a] = 0;
+  memset(target_sums, 0, cutoff * sizeof(float));
 
   printf("Starting %d threads\n", para_threads);
   fflush(stdout);
@@ -1033,13 +1034,14 @@
     i++;
   }
   hv_store(result, "paradigmatic", strlen("paradigmatic"), newRV_noinc((SV*)array), 0);
-  
+
   for(b=0; b < MAX_NEIGHBOURS; b++) {
     best[b].wordi = -1L;
     best[b].activation = 0;
     best[b].probability = 0;
     best[b].position = 0;
     best[b].activation_sum = 0;
+    memset(best[b].heat, 0, sizeof(float)*16);
   }
 
 	float total_activation = 0;
@@ -1064,6 +1066,7 @@
 			best[b].average = 0.0;
 			best[b].probability = 0.0;
 			best[b].cprobability = syn_nbs[0]->best[b].cprobability;
+			memset(best[b].heat, 0, sizeof(float)*16);
     }
 		
 		float best_window_sum[MAX_NEIGHBOURS];
@@ -1077,6 +1080,7 @@
 					best[found_index].max_activation = 0.0;
 					best[found_index].average = 0.0;
 					best[found_index].probability = 0.0;
+					memset(best[found_index].heat, 0, sizeof(float)*16);
 					best[found_index].cprobability = syn_nbs[a]->best[b].cprobability;
 					best[found_index].activation_sum = target_sums[syn_nbs[a]->best[b].wordi]; // syn_nbs[a]->best[b].activation_sum;
 					best[found_index++].wordi = syn_nbs[a]->best[b].wordi;
@@ -1281,5 +1285,5 @@
 		fprintf(f, "%f\n", M[i*size + j]);
 	}
 	fclose(f);
-	return(0);
+ 	return(0);
 }
