OSX fixes
more OSX fixes