Added kMinStdDev option and kMean is working propertly