fixed quirks in standard deviation calcs.