Switch order to allow for modal updates in callback