Fix bug in returning EOF for last string read