Fix the totalAmount to a float