fixed implicit conversion errors with msvc 12