fixing cleanaverage