fixed switch_number bug