fixes a divide by zero crash
Merge pull request #5 from erkmos/crashfix

Fix for a divide by zero related crash