Math fix.
Merge pull request #253 from jaredbischof/master

Math fix.