fixing bug in autoscanner