                        dz, dt, kx_offset, ky_offset);
             }
 
-           kx_offset += blocks[k_offset + j * kernels[rank].x + i].x * threads[k_offset + j * kernels[rank].x + i].x - 2*ng;
+            kx_offset += blocks[k_offset + j * kernels[rank].x + i].x * threads[k_offset + j * kernels[rank].x + i].x - 2*ng;
        }
        ky_offset += blocks[k_offset + j * kernels[rank].x].y * threads[k_offset + j * kernels[rank].x].y - 2*ng;
     }

                      nx, ny, nz, vec_dim, alpha, gamma,
                      dz, dt, kx_offset, ky_offset);
           }
          kx_offset += blocks[k_offset + j * kernels[rank].x + i].x * threads[k_offset + j * kernels[rank].x + i].x - 2*ng;
       }
       ky_offset += blocks[k_offset + j * kernels[rank].x].y * threads[k_offset + j * kernels[rank].x].y - 2*ng;
    }

                printf("Error: %s\n", cudaGetErrorString(err));
            }

            // NOTE: **ALL** the weirdness is happening within here only.
            rk3(kernels, threads, blocks, cumulative_kernels,
                beta_d, gamma_up_d, Uc_d, Uc_half_d, Upc_d,
                qx_p_d, qx_m_d, qy_p_d, qy_m_d, qz_p_d, qz_m_d,
