Updates to work on OSX