Added delete code for cloned segments