Rearranging promise callbacks.