Fixed a but to calculate total if some of the row in the list is empty