Used correct promise for Mac OSX