Fixed generating script issue.