Rearrange size calc to prevent div by zero exception. New calculation works as expected because calculated size can't come out as less than one.
Merge pull request #3 from megallo/master

Fix div by zero, fixes #2