fixing a few msvc warnings/errors
more compat