fixed setscript that was throwing an error