Fix code compatibility
Undo/redo is working