Minor, make MSVC happy by fixing memory safety warnings