fixed: find EOF