(a) Neither the principal nor the surety on any bond of any collecting officer or any officer to hold public funds shall be liable for the failure of such officer to account for any public money coming into his hands which he shall have deposited in any designated depository or, if the proper authority shall have failed to designate a depository, in any bank selected by him, if it was deposited in the name of the public body to which it belongs, in his own name in his official title or with his official capacity disclosed, or if the bank receiving the same shall otherwise have notice of the public nature of the deposit, provided that said failure to account is attributable solely to the failure or insolvency of such depository.
(b) Neither the principal nor the surety on the bond of the head of any state department or agency shall be liable for the failure of an employee of any such department or agency to account for any public money coming into the hands of such employee, if such employee is bonded in an amount deemed adequate by the head of the department or agency and the state auditor and the bond complies with this chapter.