Make tests more stable