Fix shell script error in mac