Another possilbe patch for kernel_thread