cast only to avoid compiler warning on msvc