fix bug of cycle_scan