Fix bugs of repayment and sns