Fix a couple of stupid defects I found debugging in *nix