The landlord may deduct money out of insurance. If there is money left to rent. However, if not enough, the lessor is entitled to claim from the tenant until the end.
The lessee may be deducted from the money and insurance, if there is money left over, but the lessor, the lessor, if you do not have enough have the right to claim from the lessee until maturity