changing 0.000001 to Settings.doubleEpsilon