fix auto scan bug