Fixed an input bug preventing key presses to be handled after a process finishes