Fix issues related to halting the last process in the OS