If after payment of all debts of said district there shall remain any surplus in the hands of said county treasurer to the credit of the fund hereinbefore mentioned, the board of supervisors shall appropriate said surplus and declare a dividend pro rata to the taxpayers of said district duly paid, and said taxpayers shall have the right to have the amount of such pro rata dividends refunded to them on demand, and the said board of supervisors shall refund such pro rata to said taxpayers and each thereof.