fixed nil cohort error