fix quadratic_form error.