Fixed sleep about invalid switch.