Fixed generator script