fix string terminator