Minor fixes for OSX