more robust selection delete logic