Fixed msvc build issues