fix issue that deleted the data part of a std::string as a std::string object