delete orphaned elements