Updating ID references for consistency.