Fix rare divide by zero crash