added extra checking to avoid devicde by zero php error Fixes #41
Merge pull request #42 from dwainm/master

added extra checking to avoid devicde by zero php error Fixes #41