4 Fixes

I've split them into separate commits, but I'm afraid I'm too lazy to make 4 pull requests