bug fix correctly use parent record to add cohorts