The creditor's right to apply the proceeds of collateral held for several debts is not limited by the fact that for one of the debts a surety also is bound. "The collateral is a trust fund which cannot be released except upon the discharge of all the obligations of the principal debtor it is pledged to secure, without releasing sureties on such obligations, but if it be applied solely to the discharge of the debtor's obligations, so far as it will extend, the surety has no vested right to have a preference in payment simply because his debt came into existence prior to another also entitled to the benefit of the collateral." 60 Obviously the proceeds of collateral must be applied to a debt for which the collateral was held, to the exclusion of other unsecured debts.61