Updates to make it work on osx 9