Exiting the lease agreement in lock-in period.

My friend and I signed a lease agreement in August for 12 months lock-in. But during the first two months of moving into the house we faced issues such as breaking of false ceiling (no one was hurt), dampness, the landlord removed the sofa set for 10 days in exchange for a promise of giving us brand new sofas and then returned the old sofas back saying the new ones will take more time and when the bed (ikea bed) in one of the bedrooms (its a 2BHK apartment) broke, it took them more than a week to fix it. We never made any noise about it with the landlord in good faith as we have always shared a respectful and cordial relations with them. Now due to unforeseen circumstances, my friend/flat mate had to quit his job and is moving back to his hometown. The landlord is asking for an amount equivalent to the brokerage (one months rent) paid by them to their broker to be deducted from our deposit which we feel is unfair. Can someone please guide us on how to deal with this legally? And if the landlord as a right to do such a thing?