Fix stupid math error in NLLS calculation