Fixed end of file repeat problem.