If costs are afterward collected from the defendant or the defendant's sureties, they shall be turned over to the state treasurer by the clerk of the court as fines are remitted.