added line to unset the related ids once processed