Windows/MSVC fixes