Fixed the calculations.