Fixed up calculations