Fixed a bad math calculation.