Fixes issue with the app terminating on esc even if exit_on_escape is set to '0'