fixing eof