Fix normalize function in q2