Fix tests that are periodically affected by precision issues