substitute
36 Discharge of surety
(1) A surety may, at any time apply to be discharged from his or her liability under a bail condition—
(a) if bail has been granted by a court—
(i) to the court that granted bail; or
(ii) to the court of appearance; or
(b) if bail has been granted by an authorised officer—to the court of appearance.
(2) However, an application may not be made if the person granted bail has failed to comply with a bail condition or undertaking to appear.
(3) If the person granted bail is not in custody or before the court when the application is made, the court must—
(a) issue a warrant to apprehend the person and bring the person before the court; or
(b) issue a summons for the person's appearance before the court.
(4) On the person's appearance before the court, the court must, unless the court considers it would be unjust to do so—
(a) direct that the applicant be discharged from his or her liability; and
(b) release the security or deposit.
(5) If the court discharges the applicant from liability, the court may—
(a) impose further bail conditions; and
(b) remand the person granted bail into custody until the further conditions are satisfied.
(6) In this section:
"court of appearance" means the court before which the accused person is required to appear in accordance with his or her undertaking to appear.