Fixed memory leaks with strings. boost::lexical_cast required to build runtime.