If the court finds that any such improvement has been made, or services rendered, or necessary rights of way or property acquired, the court shall order the board of directors of the district to take the steps authorized in this chapter for the issuance of bonds to cover the cost of the same. The board of directors of the district may also utilize the provisions of this chapter without order of court when it is necessary to correct any invalid act or proceeding which has resulted in a benefit to the district and which it might have lawfully authorized.