fix curl error on mac and linux