Fix for promises after jshint change