remove dead units from the unit array before purge occurs