Make tests more robust (hopefully)