fix up script issues