fixed cuda kernel