Many leases say that if there is litigation, you must reimburse the landlord for the cost of legal fees. However, unless you agree to do so, only the court can actually order you to pay these expenses. Sometimes landlords get perturbed about not getting back money they had to pay to lawyers. If that issue gets in the way of hammering out a workable settlement, bring the argument to the attention of the judge or law assistant and explain that you've been trying to resolve the dispute in good faith. If that's the only obstacle to settling, the court may intervene and ask the landlord's lawyer to drop the demand that you pay attorneys fees.