   initialize: (@_context, options = {}) ->
     # TODO: Make db private but allow to request it to access the store directly if needed
     @db = null
-    @_initializePromise = new Promise (resolve) =>
+    @_initializePromise = new Promise (resolve, reject) =>
       @_defaults options, @_optionDefaults
       @_domainEventsCollectionName = "#{@_context.name}.DomainEvents"
 

      .then (db) =>
        @db = db
        resolve()


  _defaults: (options, optionDefaults) ->

      upsert: true
      new: true

    return @_getCollection 'eventSourcingConfig'
    .then (collection) ->
      # TODO: findAndModify is deprecated: http://mongodb.github.io/node-mongodb-native/2.2/api/Collection.html#findAndModify
      # Use findOneAndUpdate: http://mongodb.github.io/node-mongodb-native/2.2/api/Collection.html#findOneAndUpdate
