fixes for OSX Mavericks