Fix the purchase prepayment issues