borrow check fixes