fixed nasty livelock bug in LineReader