More fixes for OSX