Fix the LoanWrapper code