Fix a typo

Rename gen so that it matches its type signature.