correct conversion between const char* and string