fix EOF index modification.