
542 S.W.2d 139 (1976)
Cecil Charles EVANS, Appellant,
v.
The STATE of Texas, Appellee.
No. 51741.
Court of Criminal Appeals of Texas.
October 13, 1976.
*140 George R. Schilter, Houston, for appellant.
Carol S. Vance, Dist. Atty., James C. Brough and Gerard W. Guerinot, Asst. Dist. Attys., Houston, Jim D. Vollers, State's Atty., David S. McAngus, Asst. State's Atty., Austin, for the State.

OPINION
DALLY, Commissioner.
This is an appeal from a conviction for the offense of burglary; punishment, enhanced by proof of a prior felony conviction under the provision of V.T.C.A. Penal Code, Sec. 12.42(b), was assessed by the jury at imprisonment for 25 years.
The appellant contends the trial court erred in refusing to grant his motion for mistrial after a State's witness allegedly brought an extraneous offense before the jury. He also contends that the court erred in admitting a confession in evidence and that he was improperly sentenced.
During the prosecutor's examination of State's witness Detective Sabino Montemayor of the Baytown Police Department, the following exchange was had:
"[PROSECUTOR]:
"Q. Nineteen.
"I draw your attention back to about the 15th day of April, 1974, and I will ask you if on that occasion you had an opportunity to have a talk or interview with a Cecil Charles Evans?
"A. I did.
"Q. And if he were in the courtroom today, could you identify him?
"A. Yes, I can.
"Q. And how did you and Mr. Evans happen to get together on that occasion?
"A. It was through investigation concerning the alleged forgeries of some checks.
"[DEFENSE ATTORNEY]: Objection.
"THE COURT: Sustained.
"[DEFENSE ATTORNEY]: That is an extraneous offense. I would ask the jury be instructed to disregard that statement.
"THE COURT: Ladies and gentlemen of the jury: You will disregard the last statement of the witness.
"[DEFENSE ATTORNEY]: Due to the fact that the jury has heard the testimony of the officer, I think irreparable damage has been done. The Defendant will move for a mistrial at this time.
"THE COURT: Be overruled."
Appellant contends Detective Montemayor's reference to an investigation was evidence of an extraneous offense committed by appellant.
*141 It has been stated that any error in the admission of improper testimony is cured by the trial court's withdrawal of the evidence and its instruction to the jury to disregard "except in extreme cases where it appears that the question or evidence is clearly calculated to inflame the minds of the jury and is of such character as to suggest the impossibility of withdrawing the impression produced on their minds." Bolden v. State, 504 S.W.2d 418 (Tex.Cr.App.1974); Allen v. State, 513 S.W.2d 556 (Tex.Cr.App.1974); Hopkins v. State, 480 S.W.2d 212 (Tex.Cr. App.1972); Nunley v. State, 467 S.W.2d 452 (Tex.Cr.App.1971); White v. State, 444 S.W.2d 921 (Tex.Cr.App.1969). It has been held that testimony referring to or implying extraneous offenses allegedly committed by the defendant is rendered harmless by the trial court's instruction to disregard. Hernandez v. State, 530 S.W.2d 563 (Tex.Cr. App.1975); Tristan v. State, 510 S.W.2d 329 (Tex.Cr.App.1974); Chatman v. State, 509 S.W.2d 868 (Tex.Cr.App.1974); Curlin v. State, 505 S.W.2d 889 (Tex.Cr.App.1974); Allen v. State, supra.
On direct examination of the State's reputation witness in Boykin v. State, 504 S.W.2d 855 (Tex.Cr.App.1974), the question "And when did you first get to know him?" was followed by the response, "I was robbed by him." It was there held the error was cured when the defendant's objection to the evidence was sustained and the jury instructed to disregard it.
The testimony of the witness in the case at bar cannot be said to be more damaging than that ruled curable in Boykin v. State, supra. In view of the trial court's prompt sustaining of counsel's objection and instruction to the jury, the error, if any, was cured. This ground of error is overruled.
Appellant next complains of the admission in evidence of his written confession. He contends that neither statutory requirements nor those of Miranda v. Arizona, 384 U.S. 436, 86 S.Ct. 1602, 16 L.Ed.2d 694 (1966) were met.
A hearing outside the presence of the jury was held to determine the admissibility of the confession. The record includes findings of fact and conclusions of law filed by the trial court holding the confession to have been freely and voluntarily given in accordance with all constitutional and statutory requirements and properly admissible in evidence.
The record reflects that on April 15, 1974, Detective Montemayor interrogated the appellant in connection with an investigation concerning alleged forged checks. Prior to the interrogation Montemayor took appellant before a magistrate who properly advised him of his rights. Appellant, along with two other men, was questioned three or four times in connection with the alleged forged checks. The other two men eventually admitted their involvement in the burglary upon which the present prosecution was predicated; they implicated the appellant in their statements. On April 16th Montemayor again advised appellant of his rights and thereafter appellant confessed to taking part in the burglary. The confession was reduced to writing and, properly witnessed, was signed by appellant.
Appellant was properly advised of his rights by a magistrate shortly after he was taken into custody and by Detective Montemayor before the confession was given. Appellant contends that the warnings administered by the magistrate applied only to his original arrest on suspicion of involvement in a forgery scheme and that he should have again been taken before a magistrate prior to being allowed to confess to the burglary. His contention is without merit. Article 15.17, V.A.C.C.P., was satisfied when appellant was initially taken before a magistrate. A warning by either a magistrate or the person taking the statement is sufficient to satisfy the requirements of Article 38.22, V.A.C.C.P.; it was not incumbent upon Detective Montemayor to take appellant before a magistrate again prior to taking the statement. See Davis v. State, 499 S.W.2d 303, 308 (Tex.Cr.App. 1973).
We hold appellant was adequately apprised of his constitutional and statutory rights in accordance with the requirements of Miranda v. Arizona, supra, and Articles *142 15.17 and 38.22, V.A.C.C.P., and his confession was therefore properly admitted in evidence. This ground of error is overruled.
Appellant also contends he was improperly sentenced. We agree. The record reflects that appellant timely filed a motion electing to have the jury assess punishment. After the jury returned a verdict of guilty, the appellant, with the consent of the prosecutor, changed his election and requested that the court assess punishment. The prosecutor recommended a punishment of imprisonment for twelve years; the court assessed punishment at twelve years imprisonment and the appellant waived his ten days to file a motion for new trial. The judge stated that he would not take up the matter of the enhancement allegation, and proceeded instead to formally sentence appellant on the unenhanced burglary charge to serve not less than two nor more than twelve years.
The court then advised the appellant of his right to appeal and when appellant affirmatively indicated that he wished to appeal, the following ensued:
"THE DEFENDANT: Yes, sir. We do intend to appeal the case.
"THE COURT: You would like to appeal?
"THE DEFENDANT: Yes, sir.
"THE COURT: There is no need and you want to appealyou feel you have not had a fair triallooks like we will set it aside and continue with our jury.
"What do you have in mind? Do you have in mind that you just want to play games?
"THE DEFENDANT: No, sir.
"THE COURT: Well, what are you doing? You are telling this Court that you want the Court to assess punishment, you have already been found guilty of burglary in this case, I don't understand what it is now that you withdraw it from the jury for what purpose? If you are not satisfied, then this is what you seem to be saying.
"All right. If he wants tojust put him back in the lockup."
The court then set aside the judgment and sentence of 12 years and proceeded to bring back the jury for a hearing on punishment. After appellant pleaded "true" to the enhancement count in the indictment, the jury assessed appellant's punishment at imprisonment for 25 years.
The trial court did not have authority to hold a punishment hearing before the jury after the appellant had elected to have punishment assessed by the court. Article 37.07, Sec. 2(b), V.A.C.C.P., provides:
"(b) Except as provided in Article 37.071, if a finding of guilty is returned, it shall then be the responsibility of the judge to assess the punishment applicable to the offense; provided, however, that (1) in any criminal action where the jury may recommend probation and the defendant filed his sworn motion for probation before the trial began, and (2) in other cases where the defendant so elects in writing at the time he enters his plea in open court, the punishment shall be assessed by the same jury. If a finding of guilty is returned, the defendant may, with the consent of the attorney for the state, change his election of one who assesses the punishment." (Emphasis added.)
After the jury returned a verdict of guilty, the record clearly reflects that the appellant, with the consent of the attorney for the State, changed his initial election of jury assessment of punishment, choosing instead to have the court assess punishment. See Benson v. State, 496 S.W.2d 68 (Tex.Cr.App.1973). Article 37.07, V.A.C. C.P., gives to the defendant the right to determine whether the court or the jury will assess his punishment; the trial court must abide by the defendant's timely election.
The proceedings had before the jury on the issue of punishment were void and of no effect. The original judgment and sentence based upon the court's assessment of punishment at imprisonment for 12 years are ordered reinstated. See North Carolina v. Pearce, 395 U.S. 711, 89 S.Ct. 2072, 23 L.Ed.2d 656 (1968). Also, see and compare *143 Ex parte Bowman, 523 S.W.2d 677 (Tex.Cr. App.1975); Payton v. State, 506 S.W.2d 912 (Tex.Cr.App.1974); Cleaveland v. State, 507 S.W.2d 769 (Tex.Cr.App.1974); Colburn v. State, 501 S.W.2d 680 (Tex.Cr.App.1973); Miller v. State, 472 S.W.2d 269 (Tex.Cr.App. 1971).
The judgment as ordered reinstated is affirmed.
Opinion approved by the Court.
