Calculation of group average metrics - bug?