Fixing some basic bugs MSVC didn't catch

Thankfully, TeamCity was on, yay. :D