Fix frac-gen.py rewrite