Some OSX fixes