Fixed divide by zero problem
Merge pull request #6 from esc24/div_zero

Fixed divide by zero problem