fixed undo & redo