fixed bug with summary being reset to zero