Fix bug with string: at the end of string, there was not a '\0' character