make sure to clamp in the kernel