Added some mac specific logic