Small fixes for MSVC