fix EOR issue