Min value fix for summary, also the summary is calculated only once for

the matrix