Exhibit 10.4





 


Fifth Amendment to Credit
Agreement


 


This Fifth Amendment
to Credit Agreement (herein, the “Amendment”) is entered into as of December 2, 2014, by and among Pioneer
Power Solutions, Inc., a Delaware corporation (the “Borrower”), the direct and indirect Domestic Subsidiaries
of the Borrower, as Guarantors, and Bank of Montreal, a
Canadian chartered bank acting through its Chicago branch (the “Bank”).


 


Preliminary Statements


 


A.The Borrower, the Guarantors
and the Bank entered into a certain Credit Agreement, dated as of June 28, 2013 (the Credit Agreement, as the same has been
amended prior to the date hereof, being referred to herein as the “Credit Agreement”). All capitalized terms
used herein without definition shall have the same meanings herein as such terms have in the Credit Agreement.


 


B.The Borrower has requested that
the Bank extend a term loan to fund, in part, the TEWI Acquisition Agreement, and the Bank is willing to do so under the terms
and conditions set forth in this Amendment.


 


Now,
Therefore, for good and valuable consideration, the receipt and sufficiency of which is hereby acknowledged, the parties
hereto agree as follows:


 


Section 1.Amendments.


 


Subject to the satisfaction
of the conditions precedent set forth in Section 2 below, the Credit Agreement shall be and hereby is amended as follows:


 


1.1.The definition of
“Borrowing Base” appearing in Section 1.1 shall be amended by replacing clause (c) thereof with the following:


 


(c)reserved;
less


 


1.2.The definition of
“Term Loan Maturity Date” shall be amended and restated in its entirety to read as follows:


 


“Term Loan
Maturity Date” means five (5) years from the Fifth Amendment Effective Date.


 


1.3.New definitions of
“Fifth Amendment Effective Date”, “PTES”, “TEWI” and “TEWI Acquisition”
shall be inserted in appropriate alphabetical sequence to read as follows:


 


“Fifth Amendment
Effective Date” means December 2, 2014.


 






    	 



    	 



    

  


“PTES”
means PTES Acquisition Corp., a Delaware corporation.


 


“TEWI”
means Titan Energy Worldwide, Inc., a Nevada corporation.


 


“TEWI Acquisition”
means the Acquisition by PCP (or a Subsidiary thereof) of TEWI and its Subsidiaries by (a) purchasing at least 51% of the
Class D preferred stock thereof, and (b) acquiring from TEWI all of the new Series A-1 convertible preferred stock
of TEWI for a cash purchase price not to exceed $1,000,000. For the avoidance of doubt, all references to Permitted Acquisition
shall be deemed to include the TEWI Acquisition.


 


1.4.Section 2.1 of the
Credit Agreement is hereby amended and restated in its entirety as follows:


 


Section 2.1.Term Loan
Facility. Subject to the terms and conditions hereof, the Bank agrees to make loans (the “Term Loan”) in
U.S. Dollars to the Borrower in the amount of $5,000,000. The Term Loan shall be advanced in one Borrowing on the Fifth Amendment
Effective Date, at which time the Term Loan Commitment shall expire. As provided in Section 2.6(a), the Borrower may elect
that the Term Loan be outstanding as U.S. Prime Rate Loans or Eurodollar Loans. No amount repaid or prepaid on the Term Loan
may be borrowed again.


 


1.5.Section 2.7(a) of
the Credit Agreement is hereby amended and restated in its entirety as follows:


 


(a) Scheduled
Payments of Term Loan. The Borrower shall make principal payments on the Term Loan in installments on the last day of each
March, June, September, and December in each year, commencing with the calendar quarter ending March 31, 2015, with the amount
of each such principal installment to equal the percentage of the original Borrowing of the Term Loan set forth in Column B
below shown opposite of the relevant due date as set forth in Column A below:


 


	
        Column A

        Payment
        Date
	
        Column B

        Percentage

	03/31/15	1.25%
	06/30/15	1.25%
	09/30/15	1.25%
	12/31/15	1.25%
	03/31/16	2.00%
	06/30/16	2.00%
	09/30/16	2.00%
	12/31/16	2.00%
	03/31/17	2.50%
	06/30/17	2.50%
	09/30/17	2.50%
	12/31/17	2.50%
	03/31/18	3.00%
	06/30/18	3.00%
	09/30/18	3.00%
	12/31/18	3.00%
	03/31/19	3.75%
	06/30/19	3.75%
	09/30/19	3.75%


  


, with a final payment of all principal
and interest not sooner paid on the Term Loan due and payable on the Term Loan Maturity Date.


 






    	-2-



    	 



    

 


 


1.6.Section 6.6 of the
Credit Agreement shall be amended and restated in its entirety to read as follows:


 


Section 6.6.No Material
Adverse Change. Since March 31, 2013 (the Fifth Amendment Effective Date for TEWI and its Subsidiaries), there has been
no change in the condition (financial or otherwise) or business prospects of any Loan Party or any Subsidiary of a Loan Party except
those occurring in the ordinary course of business, which individually or in the aggregate would reasonably be expected to have
a Material Adverse Effect.


 


1.7.Section 8.5 of the
Credit Agreement shall be amended by amending and restating clauses (b), (c) and (e) to read as follows:


 


(b)as soon as available, and
in any event no later than 45 days after the last day of the first three fiscal quarters of each fiscal year of the Borrower,
a copy of the consolidated and consolidating balance sheet of (i) the Loan Parties and (ii) the Borrower and its Subsidiaries,
each as of the last day of such fiscal quarter and the consolidated and consolidating statements of income, retained earnings,
and cash flows of (i) the Loan Parties and (ii) the Borrower and its Subsidiaries, each for the fiscal quarter and for
the fiscal year-to-date period then ended, each in reasonable detail showing in comparative form the figures for the corresponding
date and period in the previous fiscal year, prepared by the Borrower in accordance with GAAP (subject to the absence of footnote
disclosures and year-end audit adjustments) and certified to by a Financial Officer of the Borrower;


 






    	-3-



    	 



    

  


(c)as soon as available, and
in any event no later than 120 days after the last day of each fiscal year of the Borrower, a copy of the consolidated balance
sheet of the Loan Parties and their Non-Canadian Subsidiaries as of the last day of the fiscal year then ended and the consolidated
statements of income, retained earnings, and cash flows of the Loan Parties and their Non-Canadian Subsidiaries for the fiscal
year then ended, and accompanying notes thereto and a supplemental informational section that contains consolidating financial
statements for the fiscal year then ended, each in reasonable detail showing in comparative form the figures for the previous fiscal
year, accompanied in the case of the consolidated financial statements by a compilation report (or, if requested by the Bank by
no later than September 15th each year, an unqualified opinion) of BDO USA, LLP or another firm of independent public accountants
of recognized standing, selected by the Borrower and reasonably satisfactory to the Bank, to the effect that the consolidated financial
statements have been prepared in accordance with GAAP and present fairly in accordance with GAAP the consolidated financial condition
of the Loan Parties and Non-Canadian Subsidiaries of the close of such fiscal year and the results of their operations and cash
flows for the fiscal year then ended;


 


(e)as soon as available, and
in any event no later than 120 days after the last day of each fiscal year of PECI, a copy of the consolidated balance sheet
of PECI and its Subsidiaries as of the last day of the fiscal year then ended and the consolidated statements of income, retained
earnings, and cash flows of PECI and its Subsidiaries for the fiscal year then ended, and accompanying notes thereto and a supplemental
informational section that contains consolidating financial statements for the fiscal year then ended, each in reasonable detail
showing in comparative form the figures for the previous fiscal year, accompanied in the case of the consolidated financial statements
by a compilation report (or, if requested by the Bank by no later than September 15th each year, an unqualified opinion) of
BDO USA, LLP or another firm of independent public accountants of recognized standing, selected by PECI and reasonably satisfactory
to the Bank, to the effect that the consolidated financial statements have been prepared in accordance with GAAP and present fairly
in accordance with GAAP the consolidated financial condition of PECI and its Subsidiaries as of the close of such fiscal year and
the results of their operations and cash flows for the fiscal year then ended;


 






    	-4-



    	 



    

  


1.8.Section 8.7
of the Credit Agreement shall be amended by (i) deleting the word “and” at the end of clause (o), and (ii) inserting
new clauses (q) and (r) to read as follows:


 


(q)unsecured Indebtedness of
TEWI in an aggregate amount of principal amount not to exceed $3,300,000 (plus accrued interest) or such greater amount as may
be approved by the Bank; and


 


(r)Indebtedness in an amount
of up to $2,900,000 of TEWI owing to PTES on the Fifth Amendment Effective Date.


 


1.9.Section 8.9 of the
Credit Agreement shall be amended by (i) deleting the word “and” at the end of clause (i), (ii) redesignating
clause (j) as clause (l) and (iii) inserting new clauses (j) and (k) to read as follows:


 


(j)a $2,900,000 loan on the Fifth
Amendment Effective Date to TEWI by PTES, together with any further advances made to TEWI pursuant to Section 8.7(e), which
loan may be converted, in whole or in part, into an equity investment;


 


(k)the Borrower’s creation
of and investment in PTES to facilitate the TEWI Acquisition; and


 


1.10.Section 8.23(a)
of the Credit Agreement shall be amended and restated in its entirety to read as follows:


 


(a)Total Leverage Ratio.
As of the last day of each fiscal quarter of the Borrower ending during the relevant period set forth below, the Loan Parties and
their Non-Canadian Subsidiaries shall not permit the Total Leverage Ratio to be greater than the corresponding ratio set forth
opposite such period:


 






    	-5-



    	 



    

 


 


	Period(s) Ending	Total Leverage Ratio shall not be greater than:
	Fiscal quarters ending on or about 12/31/14—9/30/15 	3.75 to 1.0
	Fiscal quarters ending on or about 12/31/15 and at all times thereafter	3.00 to 1.0


 


1.11.Schedule 6.2
to the Credit Agreement shall be replaced with Schedule 6.2 attached hereto.


 


Section 2.Conditions
Precedent.


 


The effectiveness of
this Amendment is subject to the satisfaction of all of the following conditions precedent:


 


2.1.The Borrower, the
Guarantors and the Bank shall have executed and delivered this Amendment.


 


2.2.The Bank shall have
received copies (executed or certified, as may be appropriate) of all legal documents or proceedings taken in connection with the
execution and delivery of this Amendment to the extent the Bank or its counsel may reasonably request.


 


2.3.Legal matters incident
to the execution and delivery of this Amendment shall be satisfactory to the Bank and its counsel, and the Bank shall have received
an opinion of counsel as to each new Guarantor.


 


2.4.The Bank shall have
received a non-refundable closing fee of $12,500.


 


2.5.All of the conditions
precedent set forth in Section 7.3 of the Credit Agreement shall be satisfied with respect to the TEWI Acquisition, as if
(a) all references therein to “Permitted Acquisition” were instead to the “TEWI Acquisition” and (b) clause
(e) thereof referred to the financial covenants set forth in Section 8.26 as of September 30, 2014.


 


2.6.The TEWI Acquisition
shall meet all of the conditions of a Permitted Acquisition except that no Quality of Earnings Report is required.


 


2.7.The Bank shall have
received a certificate from a Responsible Officer of the Borrower certifying that since September 30, 2014, no Material Adverse
Effect has occurred and that there is no litigation, action or other legal proceeding pending or known to be threatened against
the Borrower or any Guarantor which could reasonably be expected to have a Material Adverse Effect on the Borrower or any Guarantor.


 






    	-6-



    	 



    

  


2.8.The Bank shall be
satisfied with the capital and organizational structure of the TEWI Acquisition, including that the total equity and debt investment
does not exceed $6,800,000.


 


Section 3.Conditions
Subsequent.


 


The Borrower hereby
covenants and agrees that the following items may be delivered after the Fifth Amendment Effective Date, notwithstanding any requirements
of Section 2 above.


 


3.1.Within 90 days of
the Fifth Amendment Effective Date, the Borrower shall deliver satisfactory opinions with respect to all remaining new Guarantors
(other than those formed in Delaware, which shall be required on the Fifth Amendment Effective Date).


 


Section 4.Representations.


 


In order to induce
the Bank to execute and deliver this Amendment, the Borrower hereby represents to the Bank that as of the date hereof (a) 
the representations and warranties set forth in Section 6 of the Credit Agreement are and shall be and remain true and correct
(except that the representations contained in Section 6.5 shall be deemed to refer to the most recent financial statements
of the Borrower delivered to the Bank) and (b) the Borrower is in compliance with the terms and conditions of the Credit Agreement
and no Default or Event of Default has occurred and is continuing under the Credit Agreement or shall result after giving effect
to this Amendment.


 


Section 5.Miscellaneous.


 


5.1.The Borrower and the Guarantors
heretofore executed and delivered to the Bank the Security Agreement and certain other Collateral Documents. The Borrower and the
Guarantors hereby acknowledge and agree that the Liens created and provided for by the Collateral Documents continue to secure,
among other things, the Secured Obligations arising under the Credit Agreement as amended hereby; and the Collateral Documents
and the rights and remedies of the Bank thereunder, the obligations of the Borrower and Guarantors thereunder, and the Liens created
and provided for thereunder remain in full force and effect and shall not be affected, impaired or discharged hereby. Nothing herein
contained shall in any manner affect or impair the priority of the liens and security interests created and provided for by the
Collateral Documents as to the indebtedness which would be secured thereby prior to giving effect to this Amendment.


 


5.2.Except as specifically amended
herein, the Credit Agreement shall continue in full force and effect in accordance with its original terms. Reference to this specific
Amendment need not be made in the Credit Agreement, the Notes, or any other instrument or document executed in connection therewith,
or in any certificate, letter or communication issued or made pursuant to or with respect to the Credit Agreement, any reference
in any of such items to the Credit Agreement being sufficient to refer to the Credit Agreement as amended hereby.


 






    	-7-



    	 



    

  


5.3.The Borrower agrees to pay
on demand all costs and expenses of or incurred by the Bank in connection with the negotiation, preparation, execution and delivery
of this Amendment, including the reasonable fees and expenses of counsel for the Bank.


 


5.4.This Amendment may be executed
in any number of counterparts, and by the different parties on different counterpart signature pages, all of which taken together
shall constitute one and the same agreement. Any of the parties hereto may execute this Amendment by signing any such counterpart
and each of such counterparts shall for all purposes be deemed to be an original. Delivery of a counterpart hereof by facsimile
transmission or by e-mail transmission of an Adobe portable document format file (also known as a “PDF” file) shall
be effective as delivery of a manually executed counterpart hereof. This Amendment shall be governed by, and construed in accordance
with, the internal laws of the State of Illinois.


 


[Signature
Page to Follow]


 






    	-8-



    	 



    

  


This Fifth Amendment
to Credit Agreement is entered into as of the date and year first above written.


 





	 	“Borrower”
	 	 	 
	 	Pioneer Power Solutions, Inc.
	 	 	 
	 	By	/s/ Andrew Minkow
	 	 	Name Andrew Minkow
	 	 	Title Chief Financial Officer
	 	 	 
	 	“Guarantors”
	 	 	 
	 	Jefferson Electric, Inc.
	 	 	 
	 	By	/s/ Andrew Minkow
	 	 	Name Andrew Minkow
	 	 	Title Chief Financial Officer
	 	 	 
	 	Pioneer Critical Power Inc.
	 	 	 
	 	By	/s/ Andrew Minkow
	 	 	Name Andrew Minkow
	 	 	Title Chief Financial Officer
	 	 	 
	 	Pioneer Custom Electrical Products Corp.
	 	 	 
	 	By	/s/ Andrew Minkow
	 	 	Name Andrew Minkow
	 	 	Title Chief Financial Officer
	 	 	 
	Accepted and agreed
to.	 	 
	 	 	 
	 	Bank of Montreal, acting through its Chicago Branch
	 	 	 
	 	By	/s/ Joseph W. Linder
	 	 	Name Joseph W. Linder
	 	 	Title Vice President



 


 





[Signature Page to Fifth Amendment to Credit
Agreement]


 











    	 



    	 



    

  


Schedule 6.2


 


Subsidiaries


 


	Name	Jurisdiction of Organization	Percentage Ownership	Owner
	 	 	 	 
	Pioneer Critical Power, Inc.	Delaware	100%	Borrower
	 	 	 	 
	Jefferson Electric, Inc.	Delaware	100%	Borrower
	 	 	 	 
	Nexus Custom Magnetics, LLC	Texas	100%	Jefferson Electric, Inc.
	 	 	 	 
	JE Mexican Holdings, Inc.	Delaware	100%	Borrower
	 	 	 	 
	Jefferson Electric Mexico Holdings, LLC	Wisconsin	100%	JE Mexican Holdings, Inc.
	 	 	 	 
	Nexus Magneticos de Mexico, S. de R.L. de C.V.	Mexico	100%	
        Nexus Custom Magnetics, LLC—99%

        Jefferson Electric Mexico Holdings, LLC—1%

	 	 	 	 
	Pioneer Electrogroup Canada, Inc.	Quebec	100%	Borrower
	 	 	 	 
	Pioneer Custom Electrical Products Corp.	Delaware	100%	Borrower
	 	 	 	 
	PTES Acquisition Corp.	Delaware	100%	PCP
	 	 	 	 
	Titan Energy Worldwide, Inc.	Nevada	>51%	PTES
	 	 	 	 
	Stellar Energy Services, Inc.	Minnesota	100%	TEWI
	 	 	 	 
	Titan Systems Northeast, Inc.	Minnesota	100%	TEWI
	 	 	 	 
	Grove Power, Inc.	Florida	100%	TEWI