(4) When the conditions of the previously posted bail bond have been performed and the accused has been discharged from all obligations in the cause, the clerk of the court shall return to the accused or to the defendant's designee by an assignment executed at the time the bail amount is deposited, unless the court orders otherwise, 90% of the sum which had been deposited and shall retain as bail bond costs 10% of the amount deposited. However, in no event shall the amount retained by the clerk as bail bond costs be less than $5.
Notwithstanding the foregoing, in counties with a population of 3,000,000 or more, in no event shall the amount retained by the clerk as bail bond costs exceed $100. Bail bond deposited by or on behalf of a defendant in one case may be used, in the court's discretion, to satisfy financial obligations of that same defendant incurred in a different case due to a fine, court costs, restitution or fees of the defendant's attorney of record. In counties with a population of 3,000,000 or more, the court shall not order bail bond deposited by or on behalf of a defendant in one case to be used to satisfy financial obligations of that same defendant in a different case until the bail bond is first used to satisfy court costs and attorney's fees in the case in which the bail bond has been deposited and any other unpaid child support obligations are satisfied.
In counties with a population of less than 3,000,000, the court shall not order bail bond deposited by or on behalf of a defendant in one case to be used to satisfy financial obligations of that same defendant in a different case until the bail bond is first used to satisfy court costs in the case in which the bail bond has been deposited.
At the request of the defendant, the court may order such 90% of the defendant's bail deposit, or whatever amount is repayable to the defendant from such deposit, to be paid to defendant's attorney of record.