20 (1) Where a lessor is proceeding by action or otherwise to enforce a right of re-entry or forfeiture, whether for non-payment of rent or for other cause, the lessee may, in the lessor’s action, if any, or if there is no such action pending, then in an action or application in the Superior Court of Justice brought by the lessee, apply to the court for relief, and the court may grant such relief as, having regard to the proceeding and conduct of the parties under section 19 and to all the other circumstances, the court thinks fit, and on such terms as to payment of rent, costs, expenses, damages, compensation, penalty, or otherwise, including the granting of an injunction to restrain any like breach in the future as the court considers just.  R.S.O. 1990, c. L.7, s. 20 (1); 2006, c. 19, Sched. C, s. 1 (1). Where re-entry or forfeiture is under a statute (2) This section and section 19 apply, although the proviso or stipulation under which the right of re-entry or forfeiture accrues is inserted in the lease in pursuance of the directions of a statute.  R.S.O. 1990, c. L.7, s. 20 (2). Lease until breach (3) For the purposes of this section, a lease limited to continue only as long as the lessee abstains from committing a breach of covenant is and takes effect as a lease to continue for any longer term for which it could subsist, but determinable by a proviso for re-entry on such a breach.  R.S.O. 1990, c. L.7, s. 20 (3). When proceeding may be stayed (4) Where the proceeding is brought to enforce a right of re-entry or forfeiture for non-payment of rent and the lessee, at any time before judgment, pays into court all the rent in arrear and the costs of the proceeding, the proceeding is forever stayed.  R.S.O. 1990, c. L.7, s. 20 (4). Position of lessee (5) Where relief is granted under this section, the lessee shall hold and enjoy the demised premises according to the lease thereof made without any new lease.  R.S.O. 1990, c. L.7, s. 20 (5). Application of section (6) This section applies to leases made either before or after the commencement of this Act and applies despite any stipulation to the contrary.  R.S.O. 1990, c. L.7, s. 20 (6). Exceptions (7) This section does not extend, (a)  to a covenant or condition against the assigning, underletting, parting with the possession, or disposing of the land leased; or to a condition for forfeiture on the bankruptcy of the lessee, or on the lessee making an assignment for the benefit of creditors under the Assignments and Preferences Act, or on the taking in execution of the lessee’s interest; or (b)  in the case of a mining lease, to a covenant or condition for allowing the lessor to have access to or inspect books, accounts, records, weighing machines or other things, or to enter or inspect the mine or the workings thereof.  R.S.O. 1990, c. L.7, s. 20 (7). Condition for relief for non-insurance (8) Where the right of re-entry or forfeiture is in respect of a breach of a covenant or condition to insure, relief shall not be granted if at the time of the application for relief there is not an insurance on foot in conformity with the covenant or condition to insure except, in addition to any other terms that the court may impose, upon the term that the insurance is effected.  R.S.O. 1990, c. L.7, s. 20 (8). Section Amendments with date in force (d/m/y) 2006, c. 19, Sched. C, s. 1 (1) - 22/06/2006