In an action prosecuted or defended by an executor, administrator, trustee of an express trust, or a person expressly authorized by a statute to prosecute or defend therein, costs shall be recovered as in ordinary cases, but such costs shall only be chargeable upon or collected from the estate, fund, or party represented, unless the court orders the same to be recovered from the plaintiff or defendant personally for mismanagement or bad faith in such action or the defense thereto.