Update toggling logic.