fixes to the scripts