minor fixes for OSX