If, on an appeal taken under the provisions of Section 20-5-10 of this Act, the plaintiff is determined not to have the authority to maintain the proceeding as to any property that is the subject of that appeal or if, with the consent of all parties to the proceeding whose interests are affected, the plaintiff dismisses the complaint or abandons the proceedings as to any property that is the subject of the appeal, the trial court then shall enter an order: (i) revesting the title to the property in the parties entitled thereto, if the order of taking vested title in the plaintiff; (ii) requiring the plaintiff to deliver possession of the property to the parties entitled to possession; and (iii) making such provision as is just for the payment of damages arising out of the plaintiff's taking and use of the property and also for costs, expenses, and attorney fees, as provided in Section 10-5-70 of this Act. The court may order the clerk of the court to pay those sums to the parties entitled thereto out of the money deposited by the plaintiff in accordance with the provisions of subsection (a) of Section 20-5-15 of this Act.
735 ILCS 30/20-5-45