Fix generate prologue for generators