Fix generator template.
Add missing flush command.