onRejected should only be called once