Fix to total stats calculation