handling related features being deleted properly