Fixing MSVC compile errors