fixed bug in average calc