If it shall be determined upon the trial of any such escheat proceedings that the lands are held contrary to the provisions of this chapter, the court trying said cause shall render judgment condemning such lands and shall order the same to be sold as under execution; and the proceeds of such sale, after deducting costs of such suit, shall be paid to the clerk of such court so rendering judgment, and said fund shall remain in the hands of such clerk for one year from the date of such payment, subject to the order of the alien owner of such lands, or his heirs or legal representatives; and if not claimed within the period of one year, such clerk shall pay the same into the treasury of the Territory in which the lands may be situated, for the benefit of the available school fund of said Territory. The defendant in any such escheat proceedings may, at any time before final judgment, suggest and show to the court that he has conformed with the law, either becoming a bona fide resident of the United States, or by declaring his intention of becoming a citizen of the United States, or by the doing or happening of any other act which, under the provisions of this chapter, would entitle him to hold or own real estate, which being admitted or proved, such suit shall be dismissed on payment of costs and a reasonable attorney fee to be fixed by the court.