this seems to fix some of the total amount issues