Fixed test failure on MacOS