Fixes #78: Divide by zero found in static analysis