Fixing a math bug.