Fixing bugs in TextReader, mildly stable