
615 P.2d 1198 (1980)
48 Or.App. 93
STATE of Oregon, Respondent,
v.
John Owen CARDWELL, Appellant.
No. 79-8-470; CA 16440.
Court of Appeals of Oregon.
Argued and Submitted July 30, 1980.
Decided September 2, 1980.
*1199 Thomas J. Crabtree, Deputy Public Defender, Salem, argued the cause for appellant. With him on the brief was Gary D. Babcock, Public Defender, Salem.
Karen H. Green, Asst. Atty. Gen., Salem, argued the cause for respondent. With her on the brief were James M. Brown, Atty. Gen., John R. McCulloch, Jr., Sol. Gen., and William F. Gary, Deputy Sol. Gen., Salem.
Before GILLETTE, P.J., and ROBERTS and CAMPBELL, JJ.
GILLETTE, Presiding Judge.
Defendant, originally charged with seven counts of sexual offenses in two separate indictments, entered a plea of not guilty to each of the seven charges and raised a defense of mental disease or defect. After waiving his right to a jury trial, he stipulated to the admission of certain testimony pertaining to the facts underlying one of the charges in return for a dismissal of the other six counts. The trial court rejected his plea of mental disease or defect and found the defendant guilty. The court sentenced the defendant to the custody of the Corrections Division for ten years. He appeals. We reverse.
The defendant raises a number of assignments of error on appeal. Initially, he contends that the trial court erred in finding that his waiver of his right to a jury trial was knowingly, voluntarily, and intelligently made. On appeal, the state concedes that the trial court committed reversible error in accepting the defendant's waiver. Therefore, this case must be remanded for a new trial.
The defendant argues, however, that the case should simply be reversed, rather than reversed and remanded, because the trial court, in its written order, dismissed the charge that was proven against him and found him guilty of charges on which no evidence was offered. This assignment requires some explanation of the facts:
In Indictment No. 79-8-470, the defendant was charged with two counts of rape in the second degree and two counts of sodomy in the second degree. In Indictment No. 79-8-471, the defendant was charged with one count of rape in the second degree and two counts of sodomy in the second degree. The defendant and the state stipulated to the testimony of certain witnesses pertaining to the facts alleged in Count III, sodomy in the second degree, of Indictment *1200 No. 79-8-471.[1] The other counts of both indictments were then to be dismissed. On the record, the trial court found defendant guilty under Count III of No. 79-8-471. The judge dismissed the other counts with prejudice, stating that there had been no attempt to prove these charges. In his written verdict, the trial judge found that the stipulated testimony was offered on Count III of Indictment No. 79-8-471 and that the defendant was guilty of the crime as charged. However, the trial court's order dismissing the other counts reads, in pertinent part, as follows:
"* * * defendant has been indicted in this court on Indictments No. 79-8-470 and 79-8-471, each containing multiple counts of alleged crimes and it further appears to the Court that the defendant having admitted the testimony of witnesses concerning Count III of Indictment No. 79-8-471, and the defendant having moved that Indictment No. 79-8-470 and two other counts in Indictment No. 79-8-471 be dismissed with prejudice and the State of Oregon having joined in the said motion and the Court being fully advised in the premises, it is
"HEREBY ORDERED, ADJUDGED AND DECREED that Indictment No. 79-8-471 be and the same is hereby dismissed as well as Counts I and II of Indictment No. 79-8-470, all be dismissed with prejudice." (Emphasis supplied).
It is the inconsistency of the two emphasized portions of the trial court's order which creates the problem.
It is true, as defendant notes, that we are bound by the written order of the trial judge even though the record indicates that he meant to rule otherwise. State v. Swain/Goldsmith, 267 Or. 527, 517 P.2d 684 (1974). In the present case it is clear that the court meant to find the defendant guilty of Count III of Indictment No. 79-8-471, but mistakenly dismissed that entire indictment against him. In a number of cases this court has declined to go behind an unambiguous written order to determine the court's intent, regardless of clear evidence on the record of what that intent was. See, e.g., State v. Hallin, 43 Or. App. 401, 602 P.2d 1134 (1979); State ex rel. MVD v. Henigan, 37 Or. App. 135, 586 P.2d 395 (1978); State v. Wright, 31 Or. App. 1213, 572 P.2d 361 (1977). In all these cases, however, the order was clear on its face. In the case before us, the trial court's order is ambiguous and internally inconsistent. The first part of the order, as well as the written verdict, reveals what count was proven against the defendant and which ones were to be dismissed. The second part of the order then dismisses the wrong count. This is an obvious scrivener's error. Given these circumstances, we conclude that the written verdict and record can be examined to determine the trial court's real intent. See State v. Sullivan, 29 Or. App. 55, 562 P.2d 560 (1977). This is a limited exception, based on the facts of this case, to the general rule previously stated.
On the basis of the written order, together with the verdict and record, we conclude that the trial court in fact found the defendant guilty of Count III of Indictment No. 79-8-471, and dismissed Counts I and II of that indictment, as well as all four counts of Indictment No. 79-8-470.
The defendant raises further assignments of error. He challenges the trial court's failure to conduct a competency hearing prior to trial; he claims that the trial court erred in admitting and considering certain statements made to police officers and one of the examining psychiatrists *1201 which were allegedly obtained in violation of his Miranda rights; he challenges the stipulation used in this case as invalid and claims that there was insufficient evidence to support the sodomy charge. He is incorrect with respect to his sufficiency of the evidence claim. The other matters were either not raised below or will be automatically disposed of on retrial.
Lastly, the defendant claims that he was deprived of his constitutional right to effective assistance of counsel by the incompetency of his counsel. This issue, except in rare instances, is one which can properly be resolved only in a post-conviction proceeding where evidence can be received on the matter. State v. Henley, 31 Or. App. 109, 569 P.2d 58 (1977). This is not such a rare instance.
Reversed and remanded for a new trial.
NOTES
[1]  It is not clear from the record which count defendant initially agreed to stipulate to. The state appeared to believe that it was Count II of Indictment No. 79-8-471 and offered evidence on that count. Defendant's counsel then indicated that it was other behavior that the defendant was admitting to; behavior that the trial court found to be more properly within Count III than Count II. The stipulation was never reduced to writing and it is not clear if the defendant knew what he was agreeing to or if, in fact, he agreed to the admitted testimony. This is but one of the many deficiencies in this record.
