Replaced magical char* stuff with std::string, which repaired everything