Fix occasional division by zero on tests.