promise.js fixes