Alternative implementation for msvc compliance