Fix kernel computation.