Bug fix: Take into account R distortion in the calculation of chi2.