FIX #1; checks for EOF