If a lease was subject to a registered mortgage and payment is later made for improvements on the land, the Minister may deduct from the amount of the payment and pay to the mortgagee all or part of any amount owing to the mortgagee by the lessee under the mortgage on the day the lease ended.