Make tests more reliable