Fixed junction count divide-by-zero