         Scalar3 kn, kn1, kn2, kn3;
         Scalar arg_gauss, gauss;
 
-        float W;
+        Scalar W;
         if (sqk != 0.0f) {
             numerator = Scalar(12.5663706)/sqk;
             sum1 = 0;

    if (error != cudaSuccess)
        return error;

    // Update the force and virial with fixed exclusions. The memsets are merely commented and not removed
    // to avoid merge conflicts.
//    cudaMemset(d_force, 0, sizeof(float4)*N);
//    cudaMemset(d_virial, 0, 6*sizeof(float)*virial_pitch);

    gpu_fix_exclusions_kernel <<< grid, threads >>>  (d_force,
                                                      d_virial,
                                                      virial_pitch,

            pos_frac.y *= (Scalar)Ny;
            pos_frac.z *= (Scalar)Nz;

            Scalar shift, shiftone, x0, y0, z0, dx, dy, dz;
            int nlower, nupper, mx, my, mz, nxi, nyi, nzi; 
    
            nlower = -(order-1)/2;
