Some commands were not returning the correct exit codes.