Fixed a bug in tuning standard deviation.