update for qp: frist bug