fixed critical bug for eval_Q