kernel function fixer