 				
 				_undoActive = delta < 0 && _savePending;
 				_redoActive = delta > 0 && _savePending;
+				if (!_savePending)
+					_prevState = WeaveAPI.SessionManager.getSessionState(_subject);
 				getCallbackCollection(this).triggerCallbacks();
 			}
 		}

					}
					else
					{
						// remember the session state right before applying the last step
						if (stepsRemaining == 0)
							_prevState = WeaveAPI.SessionManager.getSessionState(_subject);
						WeaveAPI.SessionManager.setSessionState(_subject, diff, false);
					}
					

					if (debug)
						trace('apply ' + (delta < 0 ? 'undo' : 'redo'), logEntry.id + ':', ObjectUtil.toString(diff));
					
					if (stepsRemaining == 0 && enableLogging.value)
					{
						// remember the session state right before applying the last step so we can rewrite the history if necessary
						_prevState = WeaveAPI.SessionManager.getSessionState(_subject);
					}
					
					if (combine)
					{
						baseDiff = WeaveAPI.SessionManager.combineDiff(baseDiff, diff);
						if (stepsRemaining <= 1)
						{
							WeaveAPI.SessionManager.setSessionState(_subject, baseDiff, false);
							combine = false;
