adapt to osx