fix run script for Mac OS X