Avoid unnecessary string copy.

Relates #160.