Return proper exit code.