Merge pull request #20 from ThePhD/master

Fixing some basic bugs MSVC didn't catch