 
 	dim3 threadsPerBlock(threads,1,1);
 	// I now have to calculate the number of blocks ....
-	int vectorblocknum = (total_number_of_neurons + threads) / threads;
+	int vectorblocknum = (neurons->total_number_of_neurons + threads) / threads;
 
 	// The maximum dimension for the grid is 65535
 	dim3 vectorblocksPerGrid(vectorblocknum,1,1);  

	// RANDOM NUMBERS
	// Create the random state seed trackers
	curandState_t* states;
	cudaMalloc((void**) &states, total_number_of_neurons*sizeof(curandState_t));
	// Initialise the random states
	init<<<threadsPerBlock, vectorblocksPerGrid>>>(42, states, total_number_of_neurons);
	CudaCheckError();
	// Keep space for the random numbers
	float* gpu_randfloats;
	CudaSafeCall(cudaMalloc((void**) &gpu_randfloats, total_number_of_neurons*sizeof(float)));
	// REQUIRED DATA SPACES
	float* currentinjection;
	CudaSafeCall(cudaMalloc((void**)&currentinjection, total_number_of_neurons*sizeof(float)));
	// Variables necessary
	clock_t begin = clock();

	// Poisson number
	int numPoisson = 0;
	for (int i = 0; i < total_number_of_neurons; i++){
		if (neurons->neuron_variables[i].rate != 0.0f){
			++numPoisson;
		}


}



// Random Number Generator intialiser
