Our total operating expenses were $29.7 million and $39.2 million for the nine months ended September 30, 2018 and 2017, respectively. Our operating expenses include management fees attributed to the Adviser of $7.9 million and $14.3 million for the nine months ended September 30, 2018 and 2017, respectively. The decrease in management fees during the three and nine months ended September 30, 2018 compared to the three and nine months ended September 30, 2017 is due to the expiration of the Commitment Period, which changed the quarterly calculation of management fees from 0.375% of aggregate commitments to 0.1875% of aggregate cost basis of investments. Interest and credit facility expenses increased during the nine months ended September 30, 2018 compared to the nine months ended September 30, 2017 due to higher weighted average interest rate during 2018. In addition, we expensed an additional $2.3 million of deferred financing costs during the prior quarter of 2018 due to the contractual decrease in our credit facility capacity which was accounted for as a debt modification during quarter ended June 30, 2018.
Net expenses include a recapture of the reimbursement from the Adviser of $8 thousand and $0 thousand for the three and nine months ended September 30, 2018, respectively.
Net realized (loss) gain onnon-controlled/non-affiliated investments
Our net realized gain onnon-controlled/non-affiliated investments for the three months ended September 30, 2018 and 2017 was $0.3 million and $0.5 million, respectively. Our net realized loss onnon-controlled/non-affiliated investments during the three months ended September 30, 2018 is due to our term loans to OTG Management, LLC. which recognized $0.2 million in gains from the reduction in the term loan balance and Ruby Tuesday, Inc. which reduced their term loan balance by $0.1 subsequent to asset sales. Our net realized gain onnon-controlled/non-affiliated investments during the three months ended September 30, 2017 was primarily attributable to the realization of gains related to our term loans to Robertshaw US HoldingCorp. and AmeriQual Group, LLC.
Our net realized (loss)/gain onnon-controlled/non-affiliated investments for the nine months ended September 30, 2018 and 2017 was ($0.3) million and $1.2 million, respectively. Our net realized loss onnon-controlled/non-affiliated investments during the nine months ended September 30, 2018 is primarily due to our term loans to HD Advanced Manufacturing Company, which recognized realized losses of $2.4 million relating to PIK interest income that was forgiven in exchange for, among other things, a cash amendment fee and a 1.5 year credit term extension. These were partially offset by an aggregate $1.9 million of realized gains from the disposition of our term loans to Mavenir, Inc. and Mavenir Private Holdings II Ltd and reductions in the term loans to OTG Management, LLC and Ruby Tuesday, Inc. resulting in gains of $0.2 million and $0.1 million, respectively. Our net realized gain onnon-controlled/non-affiliated investments during the nine months ended September 30, 2017 was primarily due to the realization of gains related to our term loans to Robertshaw US Holding Corp., Challenge Manufacturing Company LLC, AmeriQual Group, LLC and Harvest Hill Beverage Company.Net realized gain distributions from controlled affiliated investments
Our net realized gain distributions from controlled affiliated investments for the nine months ended September 30, 2018 and 2017 were $0.1 million and $0.0 million, respectively. The net realized gain during 2018 reflects a distribution from TCW Strategic Ventures during the three months ended June 30, 2018 from its net short- and long-term gains.
Net change in unrealized appreciation/depreciation onnon-controlled/non-affiliated investments
Our net change in unrealized appreciation/depreciation onnon-controlled/non-affiliated investments for the three months ended September 30, 2018 and 2017 was ($11.6) million and $15.9 million, respectively. Our net change in unrealized appreciation/depreciation for the three months ended September 30, 2018 was primarily due to our term loans to Quantum Corporation, Carrier & Technology Solutions, LLC, formerly Patriot National, Inc., Cedar Electronics Holdings, Corp., Ruby Tuesday, Inc, and Normaco, LLC which recorded unrealized depreciation of $5.0 million, $2.8 million, $2.5 million, $2.0 million and $1.8 million, all respectively. These were partially offset by a change in unrealized appreciation for our term loans toH-D Advanced Manufacturing of $4.4 million. Our net change in unrealized appreciation/depreciation for the three months ended September 30, 2017 was primarily due to our term loan toH-D Advanced Manufacturing which recorded a net increase in fair value of $22.9 million, offset by our term loans to Patriot National, Inc., and Frontier Spinning Mills, Inc., which collectively recorded decreases in fair value of $4.9 million, $1.1 million in reversals of previously recorded unrealized appreciation on our term loan to Total Military Management, Inc., and other mark to market adjustments resulting from market yield spreads during the period.
Our net change in unrealized appreciation/depreciation onnon-controlled/non-affiliated investments for the nine months ended September 30, 2018 and 2017 was ($34.8) million and $5.1 million, respectively. Our net change in unrealized appreciation/depreciation for the nine months ended September 30, 2018 was primarily due to our term loans to Carrier & Technology Solutions, LLC, formerly Patriot National, Inc., Quantum Corporation, and Cedar Electronics Holdings, Corp. which recorded unrealized depreciation of $16.8 million, $13.1 million, and $8.7 million, respectively. These were partially offset by a change in unrealized appreciation for our term loans toH-D Advance Manufacturing of $3.2 million. Our net change in unrealized appreciation/depreciation for the nine months ended September 30, 2017 was primarily due to our term loan toH-D Advanced Manufacturing which recorded a net increase in fair value of $22.4 million, offset by our term loans to Patriot National, Inc., Frontier Spinning Mills, Inc., Cedar Electronics Holdings, Corp, and Pace Industries, Inc., which collectively recorded decreases in fair value of $12.2 million, $1.1 million in reversals of previously recorded unrealized appreciation on our term loan to Total Military Management, Inc., and other mark to market adjustments resulting from market yield spreads during the period.
38