osx related fixes