When any surety to a bond under this Code becomes insolvent or dies, or when any bond is forfeited under the provisions of section 514, the Court by whose order such bond was taken or a Magistrate of the first class, may order the person from whom such security was demanded to furnish fresh security in accordance with the directions of the orig...