some changes that MSVC required for compilation