Fix stat's colculation.