Fixed the generate script