Exhibit 10(i)


Twelfth AMENDMENT TO AMENDED AND


RESTATED LOAN AND SECURITY AGREEMENT


THIS TWELFTH AMENDMENT TO AMENDED AND RESTATED LOAN AND SECURITY AGREEMENT (“Twelfth Amendment”) is made as of this _ 18 _ day of February, 2011, by and among BANK OF AMERICA, N.A. , a national banking association (“Bank of America”) with an office at 135 South LaSalle Street, 4 th Floor, Chicago, Illinois 60603, individually as a Lender and as Agent (“Agent”) for itself and any other financial institution which is or becomes a party hereto (each such financial institution, including Bank of America, is referred to hereinafter individually as a “Lender” and collectively as the “Lenders”), the LENDERS and MFRI, INC. , a Delaware corporation (“MFRI”), MIDWESCO FILTER RESOURCES, INC. , a Delaware corporation (“Midwesco”), PERMA-PIPE, INC. , a Delaware corporation (“Perma-Pipe”), THERMAL CARE, INC. , a Delaware corporation (“Thermal Care”), TDC FILTER MANUFACTURING, INC. , a Delaware corporation (“TDC”), MIDWESCO MECHANICAL AND ENERGY, INC. , a Delaware corporation (“Mechanical”) and FREEZONE HOLDINGS LIMITED LIABILITY COMPANY , a Delaware limited liability company (“Freezone”) and PERMA-PIPE CANADA, INC. , a Delaware corporation (“Perma-Pipe Canada”).  Capitalized terms used in this Agreement have the meanings assigned to them in Appendix A, General Definitions.  Accounting terms not otherwise specifically defined herein shall be construed in accordance with GAAP consistently applied.  MFRI, Midwesco, Perma-Pipe, Thermal Care, TDC, Mechanical, Freezone and Perma-Pipe Canada are sometimes hereinafter referred to individually as a “Borrower” and collectively as “Borrowers”.


WHEREAS, Borrowers (other than Mechanical, Freezone and Perma-Pipe Canada), Agent, and the Lender signatories thereto hereto entered into that certain Amended and Restated Loan and Security Agreement dated December 15, 2006, as amended by that First Amendment to Amended and Restated Loan and Security Agreement dated February 28, 2007 by and among Borrowers (other than Freezone and Perma-Pipe Canada), Agent and Lenders, by that certain Second Amendment to Amended and Restated Loan and Security Agreement dated August 28, 2007 by and among Borrowers (other than Freezone and Perma-Pipe Canada), Agent and Lenders, by that certain Third Amendment to Amended and Restated Loan and Security Agreement dated December 13, 2007 by and among Borrowers (other than Freezone and Perma-Pipe Canada), Agent and Lenders, by that certain Fourth Amendment to Amended and Restated Loan and Security Agreement dated April 17, 2008 by and among Borrowers (other than Freezone and Perma-Pipe Canada), Agent and Lenders, by that certain Fifth Amendment to Amended and Restated Loan and Security Agreement dated September 7, 2008 by and among Borrowers (other than Freezone and Perma-Pipe Canada), Agent and Lenders, by that certain Sixth Amendment to Amended and Restated Loan and Security Agreement dated January 12, 2009 by and among Borrowers (other than Freezone and Perma-Pipe Canada), Agent and Lenders, by that certain Seventh Amendment to Amended and Restated Loan and Security Agreement dated August 5, 2009 by and among Borrowers (other than Freezone and Perma-Pipe Canada), Agent and Lender, by that certain Eighth Amendment to Amended and Restated Loan and Security Agreement dated December 9, 2009 by and among Borrowers, Agent and Lenders, by that certain Ninth Amendment to Amended and Restated Loan and Security Agreement dated April 13, 2010 by and among Borrowers, Agent and Lender and by that certain Tenth Amendment to Amended and Restated Loan and Security Agreement dated May 11, 2010 by and among Borrowers, Agent and Lenders and by such certain Eleventh Agreement to Amended and Restated Loan and Security Agreement dated October 5, 2010 by and among borrower Agent and Lender (said Amended and Restated Loan and Security Agreement, as amended from time to time, the “Loan Agreement”);


NOW, THEREFORE, in consideration of the following terms and conditions, the parties agreed as follows:


1. Definitions .  Except as otherwise specifically provided for herein, all capitalized terms





---

Exhibit 10(i)


used herein without definition shall have the meanings contained in the Loan Agreement.


2. Amended Definitions .  The definitions of “Borrowing Base” and “Eligible Account” contained in Appendix A to the Loan Agreement are hereby deleted and the following are inserted in their stead:


*  *  *


“ Borrowing Base - as at any date of determination thereof, an amount equal to the lesser of:


(i)  the Revolving Credit Maximum Amount minus the unpaid principal balance of the Term Loan; or


(ii)  an amount equal to:


(x)  the sum of:


(a)  eighty five percent (85%) of the net amount of Eligible Accounts (other than Eligible Accounts arising from Short Term Projects) outstanding at such date; plus


(b)  the lesser of Seven Million Dollars ($7,000,000) (Eleven Million Dollars ($11,000,000) for the period between February 1, 2011 and September 30, 2011) or eighty five percent (85%) of the net amount of Eligible Accounts arising from Short Term Projects outstanding at such date; plus


(c)  the least of (1) Sixteen Million Dollars ($16,000,000), (2) fifty five percent (55%) of the value of Eligible Inventory at such date or (3) eighty five percent (85%) of the NOLV Percentage of the value of Eligible Inventory as of such date.


The limitations set forth in the immediately preceding sentence and each of the advance rates set forth above may be adjusted downward by Agent, as Agent shall deem necessary or appropriate in its reasonable credit judgment.  For purposes hereof, (1) the net amount of Eligible Accounts at any time shall be the face amount of such Eligible Accounts less any and all returns, rebates, discounts (which may, at Agent's option, be calculated on shortest terms), credits, allowances or excise taxes of any nature at any time issued, owing, claimed by Account Debtors, granted, outstanding or payable in connection with such Accounts at such time and (2) the amount of Eligible Inventory shall be determined on a first-in, first-out, lower of cost or market basis in accordance with GAAP.”


*  *  *


Eligible Account - an Account arising in the ordinary course of the business of any Borrower from the sale of goods or rendition of services which Agent, in its sole judgment, exercised in a commercially reasonable manner, deems to be an Eligible Account.  Without limiting the generality of the foregoing, no Account shall be an Eligible Account if:


(i)  it arises out of a sale made or services rendered by a Borrower to a Subsidiary of any Borrower or an Affiliate of any Borrower or to a Person controlled by an Affiliate of any Borrower; or


(ii)  it remains unpaid more than 90 days after the original invoice date shown on





---

Exhibit 10(i)


the invoice; or


(iii)  the total unpaid Accounts of the Account Debtor exceed 20% of the net amount of all Eligible Accounts, but only to the extent of such excess; or


(iv)  any covenant, representation or warranty contained in the Agreement with respect to such Account has been breached; or


(v)  the Account Debtor is also a creditor or supplier of a Borrower or any Subsidiary of any Borrower, or the Account Debtor has disputed liability with respect to such Account, or the Account Debtor has made any claim with respect to any other Account due from such Account Debtor to any Borrower or any Subsidiary of any Borrower, or the Account otherwise is or may become subject to right of setoff by the Account Debtor,  provided , that any such Account shall be eligible to the extent such amount thereof exceeds such contract, dispute, claim, setoff or similar right; or


(vi)  the Account Debtor has commenced a voluntary case under the federal bankruptcy laws, as now constituted or hereafter amended, or made an assignment for the benefit of creditors, or a decree or order for relief has been entered by a court having jurisdiction in the premises in respect of the Account Debtor in an involuntary case under the federal bankruptcy laws, as now constituted or hereafter amended, or any other petition or other application for relief under the federal bankruptcy laws, as now constituted or hereafter amended, has been filed against the Account Debtor, or if the Account Debtor has failed, suspended business, ceased to be Solvent, or consented to or suffered a receiver, trustee, liquidator or custodian to be appointed for it or for all or a significant portion of its assets or affairs; or


(vii) it arises from a sale made or services rendered to an Account Debtor outside the United States, unless the sale is either (1) to an Account Debtor located in Ontario or any other province of Canada in which the Personal Property Security Act has been adopted in substantially the same form as currently in effect in Ontario, (2) on letter of credit, foreign credit insurance (assigned to Agent), guaranty or acceptance terms, in each case acceptable to Agent in its sole judgment, exercised in a commercially reasonable manner or (3) the Account Debtor is Tamba B.V., a subsidiary of Royal Dutch Shell plc provided that the amount of Accounts deemed Eligible Accounts pursuant to this clause (3) shall not exceed $4,000,000; or


(viii)  (1) it arises from a sale to the Account Debtor on a guaranteed sale, sale-or-return, sale-on-approval, consignment, or any other repurchase or return basis; (2) it is subject to a reserve established by any Borrower for potential returns or refunds, to the extent of such reserve; or (3) it arises from a sale to the Account Debtor on a bill-and-hold basis unless (x) such Account Debtor has requested in writing that such sale be on a bill-and-hold basis, which writing shall contain an acknowledgement by such Account Debtor that it is obligated to pay for the subject Inventory, (y) such Inventory is delivered to the Account Debtor not later than 30 days after the original invoice date and (z) the aggregate of all such Accounts arising from bill-and-hold sales by all Borrowers, at any point in time, does not exceed One Million Five Hundred Thousand Dollars ($1,500,000); or


(ix)  the Account Debtor is the United States of America or any department, agency or instrumentality thereof, unless Borrower assigns its right to payment of such Account to





---

Exhibit 10(i)


Agent, in a manner satisfactory to Agent, in its sole judgment, so as to comply with the Assignment of Claims Act of 1940 (31 U.S.C. §203 et  seq. , as amended); or


(x)  it is not at all times subject to Agent's duly perfected, first priority security interest or is subject to a Lien that is not a Permitted Lien; or


(xi)  the goods giving rise to such Account have not been delivered to and accepted by the Account Debtor or the services giving rise to such Account have not been performed by the applicable Borrower and accepted by the Account Debtor or the Account otherwise does not represent a final sale; or


(xii)  the Account is evidenced by chattel paper or an instrument of any kind, or has been reduced to judgment; or


(xiii)  any Borrower or a Subsidiary of any Borrower has made any agreement with the Account Debtor for any extension, compromise, settlement or modification of the Account or deduction therefrom, except for discounts or allowances which are made in the ordinary course of business for prompt payment and which discounts or allowances are reflected in the calculation of the face value of each invoice related to such Account; or


(xiv)  25% or more of the Accounts owing from the Account Debtor are not Eligible Accounts hereunder or with respect to Accounts arising from Short Term Projects, 25% or more of the Accounts owing from the Account Debtor remain unpaid 60 days after the original invoice date shown on the invoice; or


(xv)  any Borrower has made an agreement with the Account Debtor to extend the time of payment thereof; or


(xvi)  it represents service charges, late fees or similar charges; or


(xvii)  it is an Account of Perma-Pipe that is subject to a performance bond or represents retention billings; or


(xviii)  Accounts which represent retention payments; or


(xix)  it is not otherwise acceptable to Agent in its sole judgment, exercised in a commercially reasonable manner.”


*  *  *


3. Total Indebtedness .  Subsection 8.2.3 of the Loan Agreement is hereby deleted and the following is inserted in its stead:


“8.2.3  Total Indebtedness .  Create, incur, assume, or suffer to exist, or permit any Subsidiary of any Borrower to create, incur or suffer to exist, any Indebtedness, except:


(i) Obligations owing to Agent or any Lender under this Agreement or any of the other Loan Documents;


(ii) Indebtedness, including without limitation Subordinated Debt, existing on the date of this Agreement and listed on Exhibit 8.2.3;


(iii) Permitted Purchase Money Indebtedness;


(iv) contingent liabilities arising out of endorsements of checks and other





---

Exhibit 10(i)


negotiable instruments for deposit or collection in the ordinary course of business;


(v) Guaranties of any Indebtedness permitted hereunder;


(vi) Indebtedness in respect of intercompany advances permitted by Section 8.2.2(iv);


(vii) obligations to pay Rentals permitted by subsection 8.2.18;


(viii) Intentionally Omitted;


(ix) IRB Indebtedness;


(x) Existing Mortgage Indebtedness;


(xi) Intentionally Omitted;


(xii) Indebtedness incurred pursuant to the Perma-Pipe Equipment Loan;


(xiii) to the extent not included above, trade payables, accruals and accounts payable in the ordinary course of business (in each case to the extent not overdue) not for Money Borrowed;


(xiv) Indebtedness incurred in connection with loans on the cash surrender value of key-man life insurance policies so long as the principal amount of such Indebtedness does not exceed $2,000,000, the per annum interest rate payable with respect to such Indebtedness does not exceed 4.25% and such Indebtedness does not require any principal amortization on or prior to December 31, 2013;


(xv) Money Borrowed incurred by foreign Subsidiaries of Borrowers and other Indebtedness not included in paragraphs (i) through (xiv) above which does not exceed at any time, in the aggregate, the sum of Eleven Million Dollars ($11,000,000);


(xvi) Indebtedness in respect to deferred taxes;


(xvii) Indebtedness relating to compensation owed to Borrower's employees for services rendered in the ordinary course of business;


(xviii) all unfunded pension and other employee benefit plan obligations and liabilities but only to the extent they are permitted to remain unfunded under applicable law; and


(xix) Indebtedness not included in paragraphs (i) through (xviii) above does not exceed at any time, in the aggregate, the sum of $500,000.


4. Unsecured Guaranties .  Subject to Borrowers effecting the repatriation of at least $2,000,000 to the United States from Foreign Subsidiaries, Agent and Lenders hereby consent to:  (x) Borrowers providing an unsecured guaranty of the obligations of Perma-Pipe of Saudi Arabia in connection with Money Borrowed owing by Perma-Pipe Saudi Arabia to Saudi British Bank in the Kingdom of Saudi Arabia so long as the principal amount of such guaranty does not exceed $10,000,000; and (y) Borrowers providing an unsecured guaranty of the obligations to Perma-Pipe India Pvt. Ltd. in connection with Money Borrowed owing by Perma-Pipe Pvt. Ltd. to HSBC so long as the principal amount of such guaranty does not exceed $3,450,000.


5. Conditions Precedent .  This Twelfth Amendment shall become effective upon receipt by Agent of a fully executed copy of this Twelfth Amendment.


6. Governing Law .  This Twelfth Amendment shall be governed by, and construed in accordance with, the laws of the State of Illinois, without regard to the principles thereof relating to conflict of laws.


7. Execution in Counterparts .  This Twelfth Amendment may be executed in any number of counterparts, which shall, collectively and separately, constitute one Agreement.


8. Continuing Effect .  Except as otherwise provided herein, the Loan Agreement remains in full force and effect.


(Signature Page Follows)














---

Exhibit 10(i)


(Signature Page to Twelfth Amendment to


Amended and Restated Loan and Security Agreement)


MFRI, INC.By:/s/ Michael D. BennettName:  Michael D. BennettTitle:  VP CFOMIDWESCO FILTER RESOURCES, INC.By:/s/ Michael D. BennettName:  Michael D. BennettTitle:  Vice PresidentPERMA-PIPE, INC.By:/s/ Michael D. BennettName:  Michael D. BennettTitle:  Vice PresidentTHERMAL CARE, INC.By:/s/ Michael D. BennettName:  Michael D. BennettTitle:  Vice PresidentTDC FILTER MANUFACTURING, INC.By:/s/ Michael D. BennettName:  Michael D. BennettTitle:  Vice PresidentMIDWESCO MECHANICAL AND ENERGY, INC.By:/s/ Michael D. Bennett:Name:  Michael D. BennettTitle:  Secretary & Treasurer





---

Exhibit 10(i)


(Signature Page to Twelfth Amendment to


Amended and Restated Loan and Security Agreement)


FREEZONE HOLDINGS LIMITED LIABILITY COMPANYBy:/s/ Michael D. BennettName:  Michael D. BennettTitle:  ManagerPERMA-PIPE CANADA, INC.By:/s/ Michael D. BennettName:   Michael D. BennettTitle:  Vice PresidentBANK OF AMERICA, N.A., as Agent and as a LenderBy:/s/ Brian ConoleName:Brian ConoleTitle:Senior Vice President