fixed error with quadratic regression