fix arbitrary kernels