fix explicit cast
Fix for MSVC linking problem