fixed scanner bug