Minor fixes in scripts on Mac