Fix bug in solve_qp