Fixed bug in rescueing promises.