         z = sqrtf(-q);
         y = J * sinhf(z) / z / besseli0(alpha);
     } else
-        y = 0.0f;
+        y = J / besseli0(alpha);
     // identity: J_1/2(z) = sin(z) * sqrt(2/pi/z)
     return y;
 }

__device__ inline float
gridkernelhat (const float u, const float kernwidth, const float sigma)
{
    // u in [-n/2,n/2]
    const float J = 2.0f*kernwidth;
    float alpha = kernel_shape(kernwidth, sigma);
    float r = M_PI*J*u;

        switch (c) {
            case '3':
                flags.koosh = 1;
                break;
            case 'a':
                flags.adjoint = 1;
                break;
