premature and broken undo stack