Fixed calculation of areas