Bugfix and Undo/Redo