fix end of file