patches for MSVC