couple small changes to kernel.c