Bug fixe 3 - calculation errors