fixes for mac os x