fixes for MSVC