Fix client deletion issue