Avoid dividing by 0
Merge pull request #14 from macb/master

Avoid dividing by 0