cleanup of text reader

There is a corner case on strings that needs taking care of.