Necessary changes to run on Mac