Alternative implementation for msvc complicance