fix generator script