fixed eof error