Fixed delete doc issue