fix delete_doc