Fix instance switcher bugs