Fixing kernel codes