Fix string termination error