fix q_term set to false error