Changing to on stateChangeSuccess