msvc compatibility fix up