Removed a bug that was accidentally introduced during the implementation
of undo/redo.