fixed stats avg calculation