Fix summary calculation bug.