further fixes for OSX Mavericks