try to fix wrong eof