fix text parser ignoring last char