Fixing flaky test