fix bug in borrowing