Fix average for standard deviation