Fixed an error in the standard deviation calculation.