Fixed a nul-terminator copying bug.