Fix zooming bug which breaks document undo/redo stack