Fix calculations.