Fixed the flaky test