Another script update to fix some more bugs.