Prevent errors when dealing with updates to a document that has been closed