Catch divide-by-0 when there are no public methods

Fixes #15
Merge remote-tracking branch 'upstream/master'