Added some support for mac