```coffeescript
class Space.eventSourcing.Projection extends Space.Object

  @mixin Space.messaging.EventSubscribing

  collections: {}
  _isInReplayMode: false
  _state: null
  _queuedEvents: null

  constructor: ->
    super
    @_state = 'projecting'
    @_queuedEvents = []
    @dependencies = {}
    _.extend @dependencies, @constructor::dependencies, @collections

  on: (event, isRebuildEvent=false) ->
    return unless @canHandleEvent(event)
    if @_is('projecting') or (@_is('rebuilding') and isRebuildEvent)
      Space.messaging.EventSubscribing.on.call this, event
    else
      @_queuedEvents.push event

  enterRebuildMode: -> @_state = 'rebuilding'

  exitRebuildMode: ->
    @_state = 'projecting'
    @on(event) for event in @_queuedEvents

  _is: (expectedState) ->
    true if expectedState is @_state
```

Remove old prop _isInReplayMode left in by mistake
user
```coffeescript
class Space.eventSourcing.Projection extends Space.Object

  @mixin Space.messaging.EventSubscribing

  collections: {}
  _state: null
  _queuedEvents: null

  constructor: ->
    super
    @_state = 'projecting'
    @_queuedEvents = []
    @dependencies = {}
    _.extend @dependencies, @constructor::dependencies, @collections

  on: (event, isRebuildEvent=false) ->
    return unless @canHandleEvent(event)
    if @_is('projecting') or (@_is('rebuilding') and isRebuildEvent)
      Space.messaging.EventSubscribing.on.call this, event
    else
      @_queuedEvents.push event

  enterRebuildMode: -> @_state = 'rebuilding'

  exitRebuildMode: ->
    @_state = 'projecting'
    @on(event) for event in @_queuedEvents

  _is: (expectedState) ->
    true if expectedState is @_state
```
assistant