Made clearing in g2.begin optional.