Fix kernel trick