delete_doc None fix