Fixing generator script