fixed typo when calculating total