Some changes for macosx