Fixed some redo/undo issues.