Correct some calculations.