Fixed bug in creating scripts.
Fixed typo.