Fix multiple borrow errors