
152 N.W.2d 497 (1967)
STATE of Minnesota ex rel. Ervin F. WEBBER, Respondent,
v.
Ralph H. TAHASH, Warden Minnesota State Prison, Appellant.
No. 40707.
Supreme Court of Minnesota.
July 28, 1967.
*499 Douglas M. Head, Atty. Gen., Gerard W. Snell, Acting Sol. Gen., St. Paul, for appellant.
C. Paul Jones, Public Defender, Ronald L. Haskvitz, Asst. Public Defender, Minneapolis, for respondent.

OPINION
NELSON, Justice.
Appeal from an order of the District Court of Washington County granting defendant's petition for a writ of habeas corpus for the purpose of giving defendant a new arraignment and trial.
Defendant was charged by information on October 9, 1964, with having committed the crime of burglary[1] in Waseca County on September 23, 1964. The structure or building which defendant was alleged to have burglarized is a tool shed located on an unoccupied farm owned by John Haley. Upon arraignment on October 14, 1964, a plea of guilty was entered and an order for presentence investigation issued. A dismissal of a charge of theft, previously filed, was also entered on that day.
Defendant was originally represented by Carl Johnson. On January 15, 1965, F. Martin Senn was appointed as defendant's attorney. Defendant's subsequent motion to withdraw the plea of guilty previously entered and to enter a demurrer to the information was granted. The demurrer was allowed in part on the same date. This was followed by a motion to amend the information which was allowed, defendant's request that any proceeding against him be reinitiated being denied. Defendant then entered a plea of not guilty to the amended information. On April 23, 1965, his motion to vacate the conviction entered on the prior plea of guilty was granted, but request for a preliminary hearing was once again denied. Following the trial a verdict of guilty was returned by the jury and defendant was thereafter sentenced to 5 years' imprisonment.
The petition for a writ of habeas corpus was filed August 4, 1966. Following an *500 evidentiary hearing held August 22, 1966, the court ordered the judgment vacated and the conviction set aside, determining, in accordance with two of defendant's contentions, that the Waseca County District Court erred when it denied defendant's request for a preliminary hearing and that the facts did not support a finding of guilty to the crime of burglary since the testimony at the trial was that the building allegedly entered by defendant was not a dwelling or other structure suitable for affording shelter for human beings nor appurtenant to or connected with a structure so adapted, as required by Minn.St. 609.58, subd. 1(2).
The legal issues before us are thus: (1) Was the structure alleged to have been entered a "building" within the meaning of Minn.St. 609.58, subd. 1(2); and (2) was defendant entitled to a preliminary hearing after his demurrer to the original information had been sustained and the information was then amended.
It appears that defendant was originally charged in an information alleging an unlawful entry into "a building commonly known and described as a shed." Although the information was materially defective, defendant at that time entered a plea of guilty thereto. After the change of counsel his motion to withdraw the plea of guilty was made and granted. The basis for the motion was that defendant was "not advised fully and sufficiently with regard to the sufficiency of the information or that if he was advised with regard to it he didn't understand the matter and his rights with regard to it."
At the same time defendant demurred to the information on the ground that the information did not conform to the statutory requirements in that the offense was not clearly set forth; the particular circumstances of the offense were not set forth; the information alleged a "shed" was entered, which does not constitute a "building"; and the information did not specify the building entered nor the ownership thereof. The court allowed the demurrer in so far as it related to the allegations concerning the location of the offense. Thereafter, the state moved to amend the information and did so by striking the word "shed" and substituting the following language:
"* * * tool shed on the John Haley farm located on the north half of the northeast quarter, section 21, township 107 north, range 23 west, Waseca County * * *."
It will be noted that the amendment added a description of the type of structure, the ownership of the structure, and the location of the structure, all of which the county attorney had failed to include in the original information.
There were two requests for a preliminary hearing, both of which were denied. In rebuttal to the allegation that defendant had originally waived preliminary hearing defendant's counsel stated:
"* * * [W]aiver of the preliminary hearing in the first instance on this charge was pursuant to an understanding that if he waived the preliminary hearing and if he proceeded as he did proceed up to the point where I appeared in the case and made a motion to withdraw the plea which was entered that then the other charge that was pending against him in Waseca County would be dismissed and that it was with the understanding that this would be the status of the matter that he agreed to waive the preliminary hearing."
1. Defendant contends that the structure alleged to have been entered was not a "building" within the meaning of § 609.58, subd. 1(2). On the basis of the owner's testimony at trial, the habeas court apparently agreed with defendant.
Appellant contends that the finding of the trial court and jury on this question is not subject to collateral attack by habeas corpus. From the transcript it appears that the case went to the jury under the *501 assumption that the shed was a "building" within the statute. The jury was instructed to determine three elements: (1) Whether defendant entered a tool shed on the Haley premises; (2) whether the entry was without the owner's consent; and (3) whether the entry was with intent to steal. Clearly, if the shed did not constitute a "building" within the meaning of the statute the burglary could not have been committed.
Section 609.58, subd. 1(2), defines "building" for purposes of subd. 2 of that section as follows:
"`Building' includes a dwelling or other structure suitable for affording shelter for human beings or appurtenant to or connected with a structure so adapted, and includes portions of such structure as are separately occupied."
The testimony of Haley, the owner of the shed, specifically takes the shed out of this definition. None of the structures on the farm were suitable for human shelter, nor were they accommodated for housing people. Upon the record submitted, the shed was not a "building" within the meaning of the statute.
Appellant, however, argues that a structure may well be capable of affording shelter for human beings and yet not afford suitable shelter, citing State v. Cuthrell, 235 N.C. 173, 69 S.E.2d 233, and State v. Lintner, 19 S.D. 447, 104 N.W. 205, for the proposition that it is sufficient if the structure be capable of affording shelter. Both of these cases deal with the crime of arson and with statutory definitions applicable to that crime. Our statute neither includes structures which are merely "capable" of affording shelter, nor does it require that the structure "afford suitable shelter." To be capable of affording shelter and to be suitable for affording shelter are two different things; and to be suitable for affording shelter and to afford suitable shelter are also two different matters. Unlike most burglary statutes, § 609.58 carries its own definition. The statute clearly requires that the structure be "suitable for affording shelter," not that it be capable of affording sheltereven though structures capable of affording shelter could be made suitable for doing so.
2-3. Jurisdiction is vested in the municipal court by a complaint and in the district court by the filing of an information. Both the complaint and the information were in the first instance fatally defective. The question is whether the original information was sufficient to confer jurisdiction.
The information is to be construed in the same light as an indictment. § 628.30. It is clearly essential to the validity of an indictment for burglary that it describe the building with sufficient certainty to apprise the defendant of the trend of the evidence to be offered against him and also to show that the structure was of such a character as to render entry therein burglarious. State v. Stone, 127 W.Va. 429, 33 S.E.2d 144. The description must be complete so as to protect the defendant from a second prosecution for the same offense. State ex rel. Edberg v. Tahash, 274 Minn. 334, 143 N.W.2d 825.
In the instant case there was neither a description of the structure nor an allegation of its ownership or location. Defendant contends that there is no question but that conviction on such an information would not preclude further prosecution for the same offense. Obviously, there is more than one shed in Waseca County. Generally, ownership of the building must be alleged to support a burglary information. Otherwise it would be fatally defective. James v. State, 77 Miss. 370, 26 So. 929; State v. James, 194 Mo. 268, 92 S.W. 679; State v. Trapp, 17 S.C. 467; State v. Kimball, 143 Wash. 370, 255 P. 122; People v. Walker, 7 Ill.2d 158, 130 N.E.2d 182; People v. Panczko, 381 Ill. 625, 46 N.E.2d 28; People v. Picard, 284 Ill. 588, 120 N.E. 546; Jackson v. State, 55 Wis. 589, 13 N.W. 448. Annotations, 20 A.L.R. *502 510, 169 A.L.R. 887. The purpose of requiring that ownership be set out in the information is to protect the defendant from a second prosecution for the same offense by identifying the offense charged. State v. Golden, 86 Minn. 206, 90 N.W. 398. In State v. Ullman, 5 Minn. 13 at 15 (Gil. 1 at 3) it was stated:
"* * * [E]very fact material to the offense charged and necessary to constitute the crime should be stated with such clearness and certainty as to enable the accused to know exactly what he is charged with. If the indictment is for a larceny, it must describe with reasonable certainty the property stolenif a burglary, the dwelling house broken * * *."
4. Although § 630.25 allows amendment where a demurrer is allowed, this section allows amendments relating to form only and not in matters of substance. State v. Armstrong, 4 Minn. 335 (Gil. 251). Here, the amendment clearly involved matters of substance.
5-6. The question is, after the amendment, was defendant entitled to a preliminary hearing. Section 628.31 states:
"No information shall be filed against any person for any offense until such person shall have had a preliminary examination as provided by law * * *."
Surely this section applies to informations which are amended by adding facts essential to the charge rather than merely making changes in form. This court has recognized the growing importance of the preliminary hearing in criminal prosecutions. It has recognized further that the preliminary hearing "may be a critical stage in the criminal proceedings". State v. Zirbes, 274 Minn. 288, 291, 143 N.W.2d 212, 215; State ex rel. Ballinger v. Tahash, 273 Minn. 177, 140 N.W.2d 53. Because of the materiality of the amendment making the defective information sufficient, defendant was entitled to those rights available to an accused upon initiation of a criminal action. McKay v. State, 90 Neb. 63, 132 N.W. 741, 39 L.R.A.,N.S., 714; Thomas v. State, 255 Ala. 632, 53 So.2d 340 (requiring rearraignment after amendment of information where amendment was material). See, also, State v. Hurd, 5 Wash.2d 308, 105 P.2d 59.
The transcript shows that defendant's plea of guilty was allowed to be withdrawn because he had not been advised of his rights relating to the pretrial proceedings and he had waived the preliminary hearing on advice of counsel that if he did so and pled guilty a second charge would be dismissed. He argues that this alone, in the absence of the amendment, should be sufficient to sustain a request for a preliminary hearing.
We think it clear that § 630.25 does not allow for amendment of an information after demurrer has been allowed where the amendment is to matters of substance. Under those circumstances, new proceedings must be initiated. An information alleging burglary which fails to set out the type of building involved, its ownership, or its location is fatally defective and will not confer jurisdiction on the district court. Nor can waiver of a preliminary hearing be found where it is established that the waiver was without understanding of the proceeding and the rights attaching thereto and where the waiver is induced by the promise of dismissal of a second charge.
We conclude upon the record herein that the order granting a writ of habeas corpus for the purpose of giving defendant a new arraignment and trial is entitled to affirmance.
Affirmed.
NOTES
[1]  Minn.St. 609.58, subd. 2(3).
