fixed division by zero
Merge pull request #4 from chadheim/master

fixed division by zero