Fixed a few errors in scripts