fixed scripts for mac and linux