Fix the return value in the EOF