Fix tests that were improperly failing intermittently