Agut issue 261

fixes issue where totals show up as NaN