Fix valid graphs test wrt g2