fix scanner reader to work properly on new unix.