added back some os x specific stuff