changes for compat between linux and macosx