Prevent crash when undostack is removed.