Fixing promise.of