Test and fix bug in standardDeviation()