fixing to work on osx