The Commonwealth of Pennsylvania has charged David E. Toms with the crime of theft by deception, a violation of § 3922(a)(3) of the Criminal Code. 18 P.S. §3922(a)(3) provides:
“(a) Offense defined — A person is guilty of theft if he intentionally obtains or witholds property of an- • other by deception. A person deceives if he intentionally:
“(3) fails to correct a false impression which the deceiver previously created or reinforced or which the deceiver knows to be influencing another to whom he stands in a fiduciary or confidential relationship.”
Defendant petitions this court for writ of habeas corpus, contending that the evidence presented at *614the preliminary hearing in support of the information does not substantiate the offense charged.
The principle function of a preliminary hearing is to protect the individual against unlawful detention. Commonwealth v. Prado, 481 Pa. 485, 393 A.2d 8 (1978). The proper method for contesting a wrongful detention resulting from alleged defects or irregularities in the preliminary hearing, is for defendant to petition the court for a writ of habeas corpus. Commonwealth v. Hetherington, 460 Pa. 17, 331 A.2d 205 (1975).
The facts in, the case at bar are as follows. Defendant entered into a written agreement, dated April 7, 1984, with Christopher Merli and Mary Theresa Merli, his wife, for the sale of a business known as The Antlers Lodge and Cottages. Among other things, the business consisted of a hotel liquor license. At the time of the signing of the agreement of sale, however, the name which appeared on the Pennsylvania Liquor Control Board Hotel Liquor License was not that of David E. Toms, but of Carol Carey. Ms. Carey was the prior holder of the liquor license by virtue of an agreement of sale between herself and Mr. Toms. The parties subsequently terminated this agreement A form for transfer of the liquor license out of Carol Carey’s name was completed and submitted to the Pennsylvania Liquor Control Board. The license, however, was never transferred from the ownership of Carol Carey.
The court held two evidentiary hearings in the matter. The evidence clearly established a breach of contract on the part of defendant in not accomplishing the transfer of the hotel liquor license. However, the evidence also established that the bureaucratic inefficiency of the Liquor Control Board was a significant contributing factor to the transfer not being accomplished. While defendant may be held ac*615countable in a civil proceeding for a breach of contract, the standard for criminal liability has not been met.
In order for a charge to be legally sufficient, the Commonwealth must establish a prima facie case by showing probable cause to believe a crime has been committed and that the defendant is the offender. Commonwealth v. Mullen, 460 Pa. 336, 333 A.2d 755 (1975); Commonwealth v. Gordon, 254 Pa. Super. 267, 385 A.2d 1013 (1978). The Commonwealth bases its case on the written agreement of sale. The Commonwealth has not presented any evidence establishing defendant’s intention to deceive the Merlis. To sustain a verdict on an indictment for theft by deception, the Commonwealth must show: (1) misrepresentation of an existing fact; (2) an obtaining of something of value; and (3) an intent to defraud. (Emphasis supplied.) Commonwealth v. Feldman, 243 Pa. Super. 408, 365 A.2d 1289 (1976). Nor has the Commonwealth presented evidence that David Toms was aware of any dec,eption on his part. The Commonwealth must show that the person making the false representation had knowledge of the falsity of his statement. Commonwealth v. Feldman, supra. The fact that defendant has failed to perform does not of itself support an inference of an intent existing at the time Mr. Toms entered into the agreement of sale to defraud. See Commonwealth v. Bentley, 302 Pa. Super. 264, 448 A.2d 628 (1982); Commonwealth v. Gallo, 473 Pa. 186, 373 A.2d 1109 (1977). Without such evidence, the Commonwealth has failed to establish a prima facie case and there is no violation of § 3922(a)(3) of the Crimes Code as a mátter of law.
We therefore issue the following
*616ORDER
And now, this May 5, 1986, the writ of habeas corpus is granted, the charge of violation of 18 P.S. § 3922(a)(3) is dismissed and defendant is discharged: