Fixed total amount bug