restore exit code