fix remove document and update document method