fixes to the master script.