fixed switch back bug