stri: fixed end of string issue