Adapt to os x