Fixed a couple of minor script errors