fix mac compile and run script