Fixed average calculation. Should go and check others