fix divide by zero bug
Merge pull request #498 from teharrison/develop

fix divide by zero bug