Fixed undo/redo in eraser mode