fix up some script errors