Fix error when doing a payment.