Correct some minor bugs

I've added two commits to this, they should be self-explanatory