Fixes to script.