The cost of advertising the part of such notices pertaining to lands purchased by others than the state shall be covered by the bids of the purchaser and collected by the collector as part of the purchase money, but for the use of the owner or proprietor of the newspaper in which such notices were published, and shall be by the collector paid over to him on demand; and for such portions of such costs, as well as for the cost of advertising lands inserted in the notice by the mistake of the collector, such collector and the sureties on his official bond shall be liable to the owner or proprietor of such newspaper.