fixed undo, redo to be fixed