Changed context switch to be from kernel mode to kernel mode