Fix generator script