fixed scan button bug