Fix exit code in scope script.