Fixed indexing issue when deleting multiple children.