Fixup some more math logic.