fixing generate script