fix some eof errors