In case where plaintiffs dismissed the unlawful detainer action they brought, denial of defendant's motion for attorney fees under the sublease is reversed where the trial court wrongly found that the action sounded in contract and fees were barred by Civil Code section 1717. Plaintiffs' action for wrongful possession following termination of the lease sounded in tort, section 1717 does not apply, and defendant was the prevailing party.