bug fix in cohorts calculation

In singles only case, exception arises because of 0 division.