Some fixes in CalculateOLS