Make tests less brittle