Fixed a math issue when dividing numbers.