Avoid divide-by-zero errors
Merge pull request #1 from ayust/patch-1

Avoid divide-by-zero errors