Fix math.  Doesn't fix crash.