Fix handling of exit_status, change exit_code to exit_status