further fixes for OSX