fixes for macosx