updated scan detector

removed useless var