Fixing memory copy problem.

We can simply use std::string objects and get around the problem this way.