         queue.drain = aggregateTaskCallback
         queue.push [firstEvent]
       else
-        aggregateTaskCallback(null)
+        aggregateTaskCallback null
 
     , Infinity # TODO determine if it is safe to treat all aggregates in parallel?
 


  @publishEvent: (event, callback) =>
    eventHandlers = @eventHandlers[event.name] or []
    queue = async.queue (eventHandler, eventHandlerTaskCallback) =>
      eventHandler event, (err) ->
        if err?

    @aggregates.push aggregate

  @commit: (callback) =>
    if @aggregates.length is 0
      callback null
      return

    aggregateQueue = async.queue (aggregate, aggregateTaskCallback) =>
      firstEvent = aggregate.appliedEvents.shift()

