Adapt to new changes in Promise API.