expense, $2.1 million of depreciation and amortization expense and a $1.7 million increase in deferred taxes. The uses of cash related to changes in operating assets primarily consisted of increases in inventories of $3.6 million, in accounts receivable of $3.4 million, in net investment in leases of $1.7 million, in income taxes of $1.2 million, and in prepaid expenses and other assets of $1.1 million. The changes in operating liabilities consisted of increases in accrued expenses and other liabilities of $2.9 million and accounts payable of $2.0 million, partially offset by a decrease in accrued payroll and related taxes of $1.3 million.
Investing Activities
Net cash used in investing activities during the nine months ended September 30, 2022, was $1.8 million, consisting of purchases of property and equipment, and patent costs.
Net cash used in investing activities during the nine months ended September 30, 2021, was $81.2 million, primarily consisting of acquisition-related payments of $79.8 million associated with the purchase of the AffloVest business and $1.4 million in purchases of property and equipment, and patent costs.
Financing Activities
Net cash used in financing activities during the nine months ended September 30, 2022, was $4.3 million, primarily consisting of payments of $5.3 million made on our term loan, slightly offset by $1.0 million in proceeds from exercise of common stock options and the issuance of common stock under the ESPP.
Net cash provided by financing activities during the nine months ended September 30, 2021, was $58.8 million, primarily consisting of borrowings of $54.8 million net of debt issuance costs incurred and $5.1 million in proceeds from the exercise of common stock options and the issuance of common stock under the ESPP, partially offset by $1.2 million in taxes paid for the net share settlement of performance and restricted stock units.
Credit Agreement
On April 30, 2021, we entered into an Amended and Restated Credit Agreement (the “Restated Credit Agreement”) with the lenders from time to time party thereto, and Wells Fargo Bank, National Association, as Administrative Agent. The Restated Credit Agreement amended and restated in its entirety our prior credit agreement.
On September 8, 2021, we entered into a First Amendment Agreement (the “Amendment”), which amends the Restated Credit Agreement (as amended by the Amendment, the “Credit Agreement”) with the lenders from time to time party thereto and Wells Fargo Bank, National Association, as administrative agent. The Amendment, among other things, adds a $30.0 million incremental term loan to the $25.0 million revolving credit facility provided by the Restated Credit Agreement. The term loan is reflected on our condensed consolidated financial statements as a note payable. The term loan and the revolving credit facility mature on September 8, 2024. The Credit Agreement provides that, subject to satisfaction of certain conditions, we may increase the amount of the revolving loans available under the Credit Agreement and/or add one or more term loan facilities in an amount not to exceed $25.0 million in the aggregate, such that the total aggregate principal amount of loans available under the Credit Agreement (including under the revolving credit facility) does not exceed $80.0 million.
On September 8, 2021, in connection with the closing of the AffloVest Acquisition, we borrowed the $30.0 million term loan and utilized that borrowing, together with a draw of $25.0 million under the revolving credit facility and cash on hand, to fund the purchase price.
On February 22, 2022, we entered into a Second Amendment Agreement (the “Second Amendment”), which further amends the Credit Agreement, including with respect to the financial covenants.
The principal of the term loan is required to be repaid in quarterly installments of $750,000 commencing January 7, 2022, through July 8, 2024, with the remaining outstanding balance due on September