   cudaDeviceSynchronize();
   checkLastErrorCUDA(__FILE__, __LINE__);
 
+  //Need just one thread per image for this kernel.
+  blocksPerGrid.y = 1;
   BoxReciprocalGPU <<< blocksPerGrid, threadsPerBlock>>>(
     vars->gpu_prefact[box],
     vars->gpu_sumRnew[box],

      shared_kvector[vectorIndex*3+1] + z * shared_kvector[vectorIndex*3+2];
    double dotsin, dotcos;
    sincos(dot, &dotsin, &dotcos);
    double factor = (2.0 * gpu_particleCharge[particleID] * gpu_prefact[vectorIndex] * lambdaCoef) * 
      (dotsin * gpu_sumRnew[vectorIndex] - dotcos * gpu_sumInew[vectorIndex]);
      
    forceX += factor * shared_kvector[vectorIndex*3];

  checkLastErrorCUDA(__FILE__, __LINE__);
  cudaMemcpy(vars->gpu_hsqr[box], hsqr, imageSize * sizeof(double),
             cudaMemcpyHostToDevice);
  checkLastErrorCUDA(__FILE__, __LINE__);
  cudaMemset(vars->gpu_sumRnew[box], 0, imageSize * sizeof(double));
  checkLastErrorCUDA(__FILE__, __LINE__);
  cudaMemset(vars->gpu_sumInew[box], 0, imageSize * sizeof(double));
  checkLastErrorCUDA(__FILE__, __LINE__);

  dim3 threadsPerBlock(256, 1, 1);
