Fixed another potential divide-by-zero case