Where an accused person faces charges under legislation providing for mandatory minimum sentences with provision for special circumstances, the trial court must: (1) advise the accused of the existence of the mandatory minimum sentence before conviction; (2) invite and allow the accused to address the court on whether special circumstances exist that would warrant a lesser sentence; and (3) record any special circumstances found. Failure to do so constitutes a gross irregularity and misdirection rendering the conviction and sentencing incompetent. This duty is particularly acute when dealing with unrepresented accused persons, with whom courts must exercise great care. Additionally, magistrates' courts lack jurisdiction to impose sentences beyond their statutory sentencing powers, even where the charge is properly laid.