Exit raw mode sooner when exiting