Fixed eof_check memory error.