Fix returning process exit codes