Fix tests on mac