Add divide by zero checks.