Ensure that the exit code is properly propagated