OSX fixes