Fix corner case when calculating number of digits in summary