fix mac script issue