     if (checkpointIndex = @getCheckpointIndex(checkpointId))?
       pop = @popChanges(@undoStack, null, checkpointIndex)
       {
-        snapshot: pop.snapshotAfter
+        snapshot: pop.snapshotBelow
         changes: (@delegate.invertChange(change) for change in pop.changes)
       }
     else


  popChanges: (fromStack, toStack, checkpointIndex, lookBack) ->
    changes = []
    snapshotBefore = null
    snapshotAfter = fromStack[checkpointIndex].snapshot
    splicedEntries = fromStack.splice(checkpointIndex)
    for entry in splicedEntries by -1
      toStack?.push(entry)
      if entry instanceof Checkpoint
        snapshotBefore = entry.snapshot if changes.length is 0
      else
        changes.push(entry)
    {changes, snapshotBefore, snapshotAfter}

  serializeStack: (stack) ->
    for entry in stack

      checkpointIndex-- while @redoStack[checkpointIndex - 1] instanceof Checkpoint
      checkpointIndex++ if @redoStack[checkpointIndex - 1]?
      pop = @popChanges(@redoStack, @undoStack, checkpointIndex, true)
      _.defaults(pop.snapshotAbove, currentSnapshot)
      {
        snapshot: pop.snapshotBelow
        changes: pop.changes
      }
    else
