fixes for standard deviation