Fixed compatibility for osx