fix the document delete