If money accumulates in an improvement fund and is likely to lie idle waiting the maturity of the bonds against the district, the city council or commission, under proper safeguards, may invest it temporarily, or may borrow it temporarily, at a reasonable rate of interest, but when so invested or borrowed, the city shall be responsible and liable for the restoration to such fund of the money so invested or borrowed with interest thereon, whenever required for the redemption of bonds maturing against such district.