fixed EOF handling