fix last exit code for prompt