Make sure the document is always returned from update_document