Calculation fixes