Fix calculations