Minor fixes in textreader