Fixed some script errors.