fix bugs for payment