fixed gen script