MSVC system cleanups - fixes observed crashes

add more checking inside MSVC system module