EOF correction