Updated kernel code