Fix bad math.