cast to avoid MSVC warning