few changes to work on osx