fixes for osx