Fixed a bug in q2