Fix unreliable tests