fix scanner bug