45.041 Amendment of bonds.—When any bond required or authorized in any action is defective in form or substance, the party giving the bond may give a new bond which is sufficient in form and substance and the new bond is as sufficient as though given in the first instance. The new bond may be given at any time before a motion attacking the sufficiency of the bond is served. Thereafter the new bond may be given by leave of court and on such terms as the court fixes. Leave to file an amended bond shall be freely given when justice so requires. If any amendment is made to a bond, the amended bond relates back to the commencement of the action and affords protection to the person in whose favor it is given from commencement although it was not theretofore binding on the surety.