fix a test that fails randomly