calculateStandardDeviation bugfix