Working on MacOS compatibility