fix a bug in the scaled kernel