(a) Whenever a judgment shall be obtained on any official bond, against principal and sureties, a direction shall be endorsed on the execution, by the plaintiff or his or her attorney, to levy the amount, in the first place, on the property of the principal and, if sufficient property of the principal cannot be found to satisfy the execution, then to levy the deficiency on the property of the sureties.
(b) If several judgments are obtained at the same time upon any official bond for damages amounting in the whole to more than the sum for which the sureties are liable, the court shall order the moneys levied from the property of the sureties on the judgments to be divided and distributed among the persons to whose use the judgments were rendered respectively, in proportion to the amount of their respective recoveries.