
93 Cal.Rptr.2d 173 (2000)
78 Cal.App.4th 765
The PEOPLE, Plaintiff and Appellant,
v.
Carl Roy DUNCAN, Defendant and Respondent.
No. B130673.
Court of Appeal, Second District, Division Six.
February 28, 2000.
Rehearing Denied March 27, 2000.
Review Denied June 21, 2000.
*174 Gil Garcetti, District Attorney; Brent Riggs, Juliet Schmidt, Deputy District Attorneys, for Plaintiff and Appellant.
Bruce A. Hoffman, Alternate Public Defender; Reid Honjiyo, Anthony Rayburn, Deputy Alternate Public Defenders, for Defendant and Respondent Carl Roy Duncan.
COFFEE, J.
A defendant was found to be incompetent five months after his preliminary hearing, and criminal proceedings were suspended. After his competence was restored, he made a nonstatutory motion to dismiss the case. He argued that he had been incompetent at the time of the preliminary hearing, which rendered his commitment unlawful. The trial court granted his motion. We affirm.

FACTS
A preliminary hearing was held following respondent Carl Roy Duncan's arrest for robbery. The evidence showed that he was in the lobby of a residential hotel in downtown Los Angeles where he struck a woman in the face and pulled a $20 bill from her hand. The victim clung to his body, but was forced to let go when Duncan ran out the door. She chased him down the street where he ran into the path of a police car and was apprehended.
The court found probable cause that Duncan had committed the charged crime, and held him to answer. An information was filed in superior court charging him with first degree robbery, and alleging that he had suffered three prior convictions *175 under the Three Strikes Law. (Pen. Code, §§ 211, 667, subd. (b) & (i); 1170.12.)[1]
The case was called to trial on five occasions, and continued each time. At the sixth appearance, the public defender declared a doubt as to Duncan's mental competence pursuant to section 1368. Criminal proceedings were suspended and both a psychiatrist and psychologist were appointed to examine Duncan.
A section 1368 hearing was held and the experts' reports were submitted. The court found that Duncan was not mentally competent and ordered him committed to Patton State Hospital.
Five months later, Duncan's recertification of mental competency was heard in superior court, and he was found competent to stand trial. The public defender filed a section 995 motion to dismiss,[2] as well as a nonstatutory motion to dismiss. Both were based on the allegation that Duncan had been mentally incompetent at the time of the preliminary hearing and thus had not been legally committed by a magistrate.
The court denied the section 995 motion, but held a hearing on the nonstatutory motion to dismiss, which it granted. It expressed its displeasure that the issue of competence had not been raised earlier, but found that the defense had met its burden by providing expert testimony that Duncan was not competent at the time of the preliminary hearing. The People appealed.

DISCUSSION

Amendment to Section 1368.1 Preserves "Two Preliminary Hearings" Rule
The People claim that there exists an exclusive procedure to raise the issue of competence at the preliminary hearing created by a 1982 amendment to section 1368.1. They argue that Duncan's failure to follow this procedure constitutes a complete waiver of the competence issue and precludes any other remedies, including his nonstatutory motion to dismiss.
Former section 1368.1, subdivision (a),[3] enacted in 1974, provided that a competency hearing could not be held until the information was filed. (Chambers v. Municipal Court (1974) 43 Cal.App.3d 809, 811, 118 Cal.Rptr. 120.) This prevented an incompetent defendant from being indefinitely committed to a state hospital without the court first determining whether there was probable cause to bind him over for trial. (Id. at p. 812, 118 Cal.Rptr. 120)
This prior version of the statute required the magistrate to proceed with the preliminary hearing in order to first establish probable cause that a crime had been committed. If probable cause was found and the case was bound over for trial, the defendant could then litigate the competency issue in a motion to set aside the information. (Chambers v. Municipal Court, supra, 43 Cal.App.3d at p. 813, 118 Cal.Rptr. 120.) If the defendant was found to have been incompetent at the time of the preliminary hearing, the information would be set aside, on the theory *176 that an incompetent defendant cannot be lawfully committed to stand trial. (Ibid.)
While the statute created additional protection for an incompetent defendant, it raised another due process issue. Where a doubt has arisen as to a defendant's competence before the preliminary hearing, it was arguably a violation of due process to nevertheless compel him to go forward with the proceeding. (Hale v. Superior Court (1975) 15 Cal.3d 221, 223, 124 Cal.Rptr. 57, 539 P.2d 817.) The Supreme Court resolved this dilemma by holding that a defendant whose information was dismissed due to his incompetency would be provided with a second preliminary hearing once his competence was restored. Thus, a defendant would only be brought to trial after he was lawfully bound over. (Ibid.) This became known as the "two preliminary hearings" rule.
The 1982 amendment to section 1368.1 requires proceedings to determine competence to be held prior to the filing of an information unless defense counsel requests a preliminary hearing. At the preliminary hearing, counsel may demur or move to dismiss for lack of reasonable cause. (§§ 1368.1, subd. (a); 859b.)
Duncan claims the amendment was merely a procedural device to promote judicial economy, and does not alter the rule that an information must be set aside where it is subsequently determined that a defendant was incompetent at the time of the preliminary hearing. Thus, where a question arises as to a defendant's competence before the preliminary hearing, but there is no dispute that a crime has been committed, it may be most efficient to postpone the preliminary hearing until defendant's competence has been restored. This eliminates an unnecessary second hearing. If, however, defense counsel believes there is a lack of probable cause that a crime has been committed, a preliminary hearing may be requested to effect an immediate resolution of that issue. If a doubt as to defendant's competence arises during or after the preliminary hearing, his right to due process is preserved by allowing him to move for dismissal of the information if the case is bound over, and by holding a second preliminary hearing once he is restored to competence.
We look to the legislative history to determine whether the 1982 amendment altered existing law and eliminated the "two preliminary hearings" rule. The objective of statutory interpretation is to ascertain the intent of the Legislature and effectuate the purpose of the statutory scheme. (Conrad v. Medical Bd. of California (1996) 48 Cal.App.4th 1038, 1046, 55 Cal.Rptr.2d 901.)
It was initially proposed that the statute be amended to require that a competency hearing would be held first, followed by only a single preliminary hearing. (Assem. Bill No. 3721, introduced by Assemblyman Farr, March 23, 1982.) This would have reversed the holdings in Chambers and Hale, and abrogated the "two preliminary hearings" rule. The proposal was met with opposition by the State Public Defender's office. (Marjorie C. Swartz, Deputy State Public Defender, letter to Assemblyman Farr, April 28,1982, regarding Assem. Bill No. 3721.)
A subsequent report deleted these proposed changes to section 1368.1 and added the language which became law. It stated in part that "This bill [AB 3721] would allow for only one preliminary hearing, after competency is restored, unless the attorney for the defendant requests a preliminary hearing before the issue of competency is taken up." (Report of Assem. Com. on Criminal Justice, May 3, 1982, p. 1, italics added.)[4]
"The person is entitled to a new preliminary hearing after restoration of competency because the first hearing was conducted *177 when the defendant was unable to understand the proceedings and cooperate with counsel. This bill retains the two hearing option only if the defendant's counsel so requests." (Report of Assem. Com. on Criminal Justice, May 3, 1982, p. 2, italics added.) "The purpose of this bill is to economize court procedures regarding competency hearings for persons charged with felonies." (Sen. Com. on Judiciary on Assem. Bill No. 3721, 1981-1982, p. 2.) The State Public Defender's office withdrew its opposition and the bill was passed by a unanimous vote.
We conclude that the Legislature intended to preserve the "two preliminary hearings" rule. It did not alter existing law, which requires a court to grant a section 995 motion and set aside the information when a defendant is determined to have been incompetent at his preliminary hearing.
Our view is buttressed by section 1387, which allows the refiling of a criminal complaint only once after the action has been dismissed, except in specified circumstances. One stated exception is when a section 995 motion has been granted due to incompetency. (§ 1387, subd. (c)(2).) Section 1387 has been amended since the 1982 amendment of section 1368.1, but subdivision (c)(2) has remained unchanged, suggesting that the Legislature intended to preserve an incompetent defendant's right to a second preliminary hearing. (People v. Barrera (1999) 70 Cal.App.4th 541, 551, 82 Cal.Rptr.2d 755 [legislative intent to maintain existing law can be inferred where a single statutory provision is amended while others are left intact].) The 1982 amendment to section 1368.1 therefore does not affect the "two preliminary hearings" rule. We reject the People's argument that the 1982 amendment created an exclusive remedy and now turn to Duncan's nonstatutory motion to dismiss.

Nonstatutory Motion to Dismiss
Denial of a substantial right at the preliminary hearing renders a defendant's commitment illegal and entitles him to a dismissal of the information on timely motion. (People v. Pompa-Ortiz (1980) 27 Cal.3d 519, 523, 165 Cal.Rptr. 851, 612 P.2d 941; Stanton v. Superior Court (1987) 193 Cal.App.3d 265, 270, 239 Cal. Rptr. 328.) Deprivation of a substantial right is properly addressed by a section 995 motion when the error is visible from the "four corners" of the preliminary hearing transcript. By contrast, an error that is not known or visible at the hearing itself (such as the competency issue in this case), may be called to the court's attention through a nonstatutory motion to dismiss. (Merrill v. Superior Court (1994) 27 Cal. App.4th 1586, 1595-1596, 33 Cal.Rptr.2d 515; Stanton, supra, at p. 269, 239 Cal. Rptr. 328.)[5] The trial court considers the materiality of the nondisclosed information and determines its effect on probable cause and the legality of the commitment proceedings. (Merrill, supra, at p. 1596, 33 Cal.Rptr.2d 515.)
"Use of the nonstatutory or pretrial motion to dismiss has been sanctioned by our Supreme Court. `Although no clear California statutory authority provides for such a pretrial motion to dismiss, we have no doubt in light of the constitutional nature of the issue as to the trial court's authority to entertain such a claim.' (Murgia v. Municipal Court (1975) 15 Cal.3d 286, 294, fn. 4, 124 Cal.Rptr. 204, 540 P.2d 44.) A pretrial nonstatutory motion *178 to dismiss is now accepted as an appropriate vehicle to raise a variety of defects." (Stanton v. Superior Court, supra, 193 Cal.App.3d at p. 271, 239 Cal.Rptr. 328.)
Conducting a preliminary hearing when the defendant is mentally incompetent violates his right to due process of law. "The preliminary hearing is a `critical stage' of the criminal proceeding at which an accused is entitled to the assistance of counsel. [Citation.] Counsel cannot effectively represent a defendant who is unable to understand the proceedings or to rationally assist him." (Hale v. Superior Court, supra, 15 Cal.3d at p. 228, 124 Cal.Rptr. 57, 539 P.2d 817.) Duncan may only be said to have been deprived of a substantial right if the trial court properly found him to have been incompetent at the time of the preliminary hearing. We thus review the evidence to see if it supports the trial court's finding.

Evidence of Incompetence
The People allege that, even if the procedure in section 1368.1 is not exclusive, there was no substantial evidence to support a finding of incompetence and Duncan was legally committed to the superior court for trial. They argue that since the mental health experts did not interview Duncan until five months after his preliminary hearing, there was no evidence to support their conclusions that he was incompetent at the time of the preliminary hearing.
Two experts submitted reports for the competency hearing, held in March of 1998. Psychologist Dr. Carl Osborn had diagnosed Duncan as psychotic and paranoid schizophrenic. He interviewed Duncan twice, once in January and again in February 1998. Duncan exhibited extreme paranoid symptoms and appeared to be having auditory hallucinations.
Psychiatrist Dr. John Stalberg examined Duncan in March 1998 and rendered a diagnosis of psychosis and schizophrenia. This was based on Duncan's disheveled appearance and that he was incoherent, hallucinating and "out of touch with reality." Both experts concluded that Duncan was incompetent to stand trial and criminal proceedings were suspended.
Eight months after appellant had been found incompetent, the hearing was held on the nonstatutory motion to dismiss. The court properly placed the burden on the defense to overcome the presumption of Duncan's competence. (§ 1369, subd. (f); People v. Medina (1990) 51 Cal.3d 870, 885, 274 Cal.Rptr. 849, 799 P.2d 1282 [for purposes of a § 1369 competency hearing, defendant is presumed competent unless incompetence is proven by a preponderance of the evidence].)
In addition to the foregoing reports of Doctors Osborn and Stalberg, new evidence was presented. Duncan had previously been treated for psychosis at Vacaville, CMC East, and Wasco. There was also evidence that he has a history of substance abuse and suffers from a seizure disorder. Records provided by the county jail indicated that, following Duncan's arrest, the jail staff had treated him with antipsychotic, antidepressant and anticonvulsant medications. At that time, he was given a diagnosis of bipolar disorder and was reported to have been hallucinating several weeks prior to the preliminary hearing. Two days following the preliminary hearing the records reflect a diagnosis of paranoid schizophrenia.
The experts also relied on a report from Patton State Hospital indicating that Duncan had been in treatment for four months, receiving both psychotropic medications and therapy. It indicated that Duncan may have been malingering during his stay. Dr. Osborn visited Duncan a third time after his return from Patton and found that he spoke coherently and was "noticeably better." Dr. Osborn believed Duncan had been malingering while at Patton, but concluded he nevertheless had been incompetent at the time of the preliminary hearing.
*179 The court found that Duncan had met his burden. It also noted that the report from Patton was hearsay, had not been received into evidence, and no one from Patton had testified.
The People rely heavily on Booth v. Superior Court (1997) 57 Cal.App.4th 91, 100, 66 Cal.Rptr.2d 758, which upheld an order denying a section 995 motion on the grounds of incompetency. In Booth, there was no evidence that the defendant was incompetent at the time of the preliminary hearing.
Substantial evidence supports the trial court's determination that Duncan's commitment was unlawful. The People have been unable to point to an abuse of discretion. We conclude that the motion to dismiss was properly granted.

Section 1385 Dismissal in Furtherance of Justice
The People also argue that the order dismissing the information was unauthorized because a defendant may not move to dismiss a case under section 1385 "in furtherance of justice." Rather, the order of dismissal must be made on the court's own motion. We reject this argument because Duncan's motion to dismiss was neither brought nor resolved under section 1385. The moving papers were entitled "Motion to Dismiss (Non-statutory, Due Process)." Though the minute order contains the statement "Disposition: Dismissal in furth [sic] of justice per 1385 PC," the oral pronouncement fails to make reference to section 1385 or to a dismissal in furtherance of justice. (People v. Gonzalez (1990) 51 Cal.3d 1179, 1239, 275 Cal.Rptr. 729, 800 P.2d 1159 [oral ruling prevails over minute order].)

Proposition 115
The People argue that the passage of Proposition 115 has so eroded the purpose of a preliminary hearing that it is now permissible to conduct a hearing while the defendant is incompetent.
Proposition 115 was passed for the purpose of streamlining the criminal justice system. (Whitman v. Superior Court (1991) 54 Cal.3d 1063, 1075, 2 Cal.Rptr.2d 160, 820 P.2d 262.) One of its effects has been to limit the preliminary hearing to the single issue of the existence of probable cause. (Id. at p. 1079, 2 Cal. Rptr.2d 160, 820 P.2d 262.) The right to cross-examine witnesses has been significantly restricted and the introduction of hearsay is now permitted. (Id, at p. 1076, 2 Cal. Rptr.2d 160, 820 P.2d 262.)
Despite these changes, a defendant has fundamental statutory and constitutional rights to be present at his preliminary hearing and to be afforded the right to counsel. (§ 977; Cal. Const., art. I, §§ 14, 15; People v. Holt (1997) 15 Cal.4th 619, 706, 63 Cal.Rptr.2d 782, 937 P.2d 213.) These rights are denied if a defendant is incompetent. "[C]ounsel cannot effectively represent a client who does not understand the nature of the charges against [him] or who is unable to cooperate in [his] defense." (Chambers v. Municipal Court, supra, 43 Cal.App.3d at p. 813, 118 Cal. Rptr. 120; Booth v. Superior Court, supra, 57 Cal.App.4th 91, 97, 66 Cal.Rptr.2d 758; Bayramoglu v. Superior Court, supra, 124 Cal.App.3d at p. 726, 176 Cal.Rptr. 487.) We reject the People's assertion that Proposition 115 has abrogated these basic rights.
The judgment is affirmed.
GILBERT, P.J, and ABBE, J,[*] concur.
NOTES
[1]  All further statutory references are to the Penal Code unless otherwise indicated.
[2]  Under section 995, subdivision (a)(2), an information may be set aside by the court when, before the information was filed, the defendant 1) had not been legally committed by a magistrate; or 2) had been committed without reasonable or probable cause.
[3]  Former section 1368.1, subdivision (a), read in part, "If the action is on a complaint charging a felony, the hearing to determine mental competence may not be held until after the information or indictment has been filed. A demurrer or a motion under Section 995 or 1538.5 may thereafter be made by counsel for the defendant, even though a proceeding to determine the defendant's mental competence is pending."

Prior to 1974, a hearing on mental competency could be held "at any time during the pendency of an action and prior to judgment." (Chambers, supra, at p. 811, 118 Cal. Rptr. 120; former section 1368, subd. (b).)
[4]  We granted the People's request for judicial notice of the legislative history of the 1982 amendment to section 1368.1.
[5]  There appears to be an exception to the general rule that a section 995 motion may only be brought when the issue of competency is contained within the four corners of the transcript. (See Bayramoglu v. Superior Court (1981) 124 Cal.App.3d 718, 728-729, 176 Cal.Rptr. 487 [995 motion granted where defendant presented additional evidence showing that he was incompetent at the time of the preliminary hearing].) Given the posture of this case, we need not resolve whether a section 995 motion was the appropriate vehicle for setting aside the information. (Merrill, supra, at p. 1596, 33 Cal.Rptr.2d 515.)
[*]   Assigned by the Chairperson of the Judicial Council.
