Upon receiving a bond or deposit, as provided in either of the foregoing sections, the court shall enter an order of restitution, directing the officer who attached the water-craft to deliver the same to the person from whose possession it was taken, and the water-craft shall be discharged from all the liens secured by such bond or deposit, unless the court, upon motion, orders it again into custody on account of the insufficiency or insolvency of the surety.
735 ILCS 5/4-218