fixed switcher() hang