fixes issues with std::vector