changes to enable scripts to work on mac