Fixed unfortunate use of c_str()   (the value return by c_str() would have been invalid after the call)