Another attempt to fix flaky unit test