Opinion by
Mr. Justice Jones,This appeal lies from an order of the Superior Court affirming an order of the Court of Common Pleas of Bradford County which, after a hearing at which Gerard McKenna was represented by court-appointed counsel, denied the issuance of a writ of habeas corpus. We granted an allocatur.
During the night of July 2, 1955, an entry was made into the office of an outdoor theatre located in Athens, Bradford County; a safe in that office was moved to the doorway of the office on a “dolly” to which was attached a chain; the safe unopened, the “dolly” and the chain were found at the office doorway. On July 4, 1955, a warrant was issued for the arrest of Gerard McKenna, [McKenna], on a charge of reckless driving in Waverly, New York, on July 2, 1955. The chief of police of Waverly, accompanied by a Pennsylvania state police officer, went to Buffalo, New York, where McKenna was apprehended and returned to Waverly. While in custody in Waverly, McKenna made a statement admitting entry into the theatre office.1 On July 6, 1955, a warrant was obtained for McKenna’s arrest upon the charge of burglary, McKenna waived extradition before a judge in *390Waver ly and lie was then returned to Bradford County and lodged in jail.2
On July 8, 1955, McKenna was given a bearing before a justice of the peace and at that hearing McKenna, unrepresented by counsel, was charged with burglary. The transcript of that hearing reveals that burglary was the sole charge then made against McKenna.3
On July 11, 1955, an indictment was prepared by the district attorney’s office in which McKenna and Hunsinger were charged with the crime of burglary in entering the office of the outdoor theatre and also with the crimes of larceny of a safe containing $609, a “dolly” valued at $50 and a chain valued at $10.4 On that date, while represented by counsel retained by his parents, McKenna waived presentation of the indictment to the grand jury and entered a plea of guilty to the indictment containing both the burglary and larceny counts. Prior to entering his plea for “a very short time” McKenna met with his counsel, a meeting which took place in the presence of certain prosecution officials, including the police, and Mc-*391Kenna’s mother. At the habeas corpus hearing, there was testimony that McKenna’s counsel then informed him that, if he had taken part in the crime and would enter a plea of not guilty, he would, by so doing, open himself to a charge of perjury in addition to the crime of which he was charged.
McKenna was sentenced to prison for a minimum term of 4 years and a maximum term of 20 years. The habeas corpus court stated: “In this case the sentence imposed was within the legal limits of a burglary sentence and to that extent the sentence was not illegal. But, the sentence of the court was for burglary and larceny and there is nothing in the record of the sentencing court or in this court allowing any inference other than that the defendant stole a safe and the $609 therein.” 5 After McKenna had served a portion of his sentence he was paroled. Later, he was returned to prison as a parole violator and he is presently serving the unexpired portion of his sentence.
A review of this record reveals beyond any question the complete absence of any evidence that McKenna had committed larceny of the safe, any money therein, the “dolly” or the chain; that the only crime of which he was accused at the preliminary hearing was burglary and the only evidence produced at such hearing related to the burglary charge; that the sole charge upon which he was bound over for grand jury action -was burglary; that, despite the lack of any charge of larceny or any evidence thereof, the indictment included three counts charging larceny; that his representation by counsel at the time he entered the plea of guilty was inadequate and ineffective under the circumstances; that the sentencing judge, in determining the sentence, must have considered the fact that McKenna had plead guilty not only to burglary but *392also to larceny of the safe, the money therein, the “dolly” and the chain. Under such circumstances, that sentence may not be permitted to stand.
The court below, while recognizing the irregularities in the procedures adopted, concluded that McKenna’s confinement in custody was proper because McKenna was represented by counsel when he waived presentation of the indictment to the grand jury, when he entered his guilty plea and when he was sentenced. With this conclusion we disagree. The circumstances presented preclude the application of a rule that such irregularities could be waived by the entry of the guilty plea when represented by counsel.
From the findings of the habeas corpus court it is obvious that the assistance of counsel was ineffective. Admittedly, counsel had read only the indictment and did not examine the transcript or other records and it is evident he was unfamiliar with what transpired at the preliminary hearing. Moreover, McKenna knew that he had been charged only with burglary and did not know he was being charged with “stealing” the safe and money therein, the “dolly” and the chain. Consultation between McKenna and counsel consumed a “very short time” and took place in the presence of the prosecuting officials, including the police. The brevity and environment of such consultation certainly did not equate the type of consultation between lawyer and client contemplated by the law. By his own admission at the habeas corpus hearing, counsel told McKenna that, if he denied the crime and plead not guilty he might become liable for another crime and counsel advised McKenna “not to add perjury to the crime already committed”.6 This advice added a co*393ercive element which casts doubt on whether the entry of the plea was an exercise of McKenna’s free and untrammeled volition.7
Moreover, when McKenna was asked by counsel whether he had committed the “crime” it was only reasonable for him to conclude counsel meant the only crime with which he had been charged at the preliminary hearing, i.e., burglary, especially in the absence of any evidence he had read the indictment. By the same token, it is understandable that counsel, having read only the indictment charges and lacking any knowledge of what transpired previous to the preparation of the indictment, was talking about the charges in the indictment when he referred to the “crime”.
Even though McKenna, at the time he entered his plea of guilty, had counsel, from the findings of the habeas corpus court it is obvious the assistance of counsel was ineffective.
Generally, a defendant, who, when represented by counsel, enters a plea of guilty cannot be heard to say later that he was ignorant of the charges in the indictment to which he plead guilty. However, it is the duty of a reviewing court to determine whether the decision of an accused to enter the plea of guilty was voluntarily, intelligently and understandingly made. Because of the serious consequences which are attendant on the entry of a plea of guilty, strict adherence must not be had to the rule that knowledge of counsel is imputable to the accused: Commonwealth ex rel. West v. Myers, 423 Pa. 1, 222 A. 2d 918 (1966).
From our study of this record, bearing in mind that which did and that which did not transpire at the preliminary hearing, the inadequacy of time and unsuitability of place for consultation between McKenna and his lawyer, the obvious lack of adequate inquiry *394by counsel into the background and circumstances of the crime or crime charges, the misinformation and improper advice ventured by counsel to McKenna of the danger of being charged with perjury, the apparent ineffectiveness of counsel’s assistance, we are satisfied from the concatenation of circumstances presented that McKenna’s plea of guilty to the crimes of burglary and larceny was given neither voluntarily, intelligently nor understandingly.
The totality of all the instant circumstances leads to grave doubts that McKenna’s constitutional rights were protected. We have no way of assessing the extent to which McKenna’s admission of guilt of the larceny charges influenced the sentencing judge in determining the appropriate sentence; at the same time, we cannot find that such admission did not so influence the court that it acted to McKenna’s prejudice. See: Townsend v. Burke, 334 U.S. 736, 740 (1948).
In view of the factual situation so vividly portrayed on this record and in view of the findings of the court below, we are satisfied that McKenna was denied due process which cannot be rectified merely by the presence of counsel particularly when the latter’s assistance was so clearly ineffective. The refusal to issue the Great Writ under such circumstances would continue the imprisonment of a person for the commission of crimes, i.e. larceny of the safe and money, the “dolly” and the chain, which, concededly, he never committed. In such posture, niceties of the law and adherence to general rules must yield to the attainment of substantial justice.
McKenna also contends that his waiver of the presentment of the indictment to the grand jury was invalid for the same reasons that his guilty plea was invalid. He concedes that, ordinarily, a preliminary hearing is not a “critical stage” in the proceedings against an accused (Commonwealth ex rel. Butler v. *395Rundle, 416 Pa. 321, 324, 206 A. 2d 283 (1965) and authorities cited therein) but argues that the preliminary hearing in his case was an exception to this rule because he was not afforded an opportunity to be heard on the larceny charge.
The Act of May 14, 1915, P.L. 499 §1, 42 P.S. §1080 provides: “Hereafter, upon a preliminary hearing before a magistrate for the purpose of determining whether a person charged with any crime or misdemeanor against the laws, except murder, manslaughter, arson, rape, mayhem, sodomy, buggery, robbery, or burglary, ought to be committed for trial, the person accused, and all persons on behalf of the person accused, shall be heard if the person accused shall so demand.”8 Under this statute the right to be heard is not self-executing but must be demanded. If the larceny charge was the only one facing McKenna we might be inclined to agree with his contention. See: Commonwealth v. Musto, 348 Pa. 300, 302-03, 35 A. 2d 307 (1944); McCullough v. Commonwealth, 67 Pa. 30, 33 (1871); Hale v. Henkel, 201 U.S. 43, 64-65, 26 S. Ct. 370 (1905). However, at the preliminary hearing, the charge being burglary, McKenna had no statutory right to be heard even had he so demanded, and therefore, the fact that an indictment containing this charge was drawn up against him cannot be viewed as prejudicial. Because the larceny counts must be dismissed, McKenna is now in the same position as he would have been had the facts at the time of the 1955 preliminary hearing been as he and his counsel evidently believed them to be.
Order reversed and the writ issued subject to the right of the Commonwealth to retry McKenna on the burglary charge.
At the habeas corpus hearing, the state police officer testified that he informed McKenna that he had obtained a written statement from one Bernard Hunsinger which implicated both McKenna and Hunsinger in the burglary and that he exhibited the so-called statement in front of McKenna whereupon McKenna admitted his participation in the offense. As a matter of fact, Hun-singer had made no such statement. After McKenna made his statement, Hunsinger was then picked up and he then made a statement.
The habeas corpus court found that McKenna was never warned of bis right to remain silent, that he was denied the use of a telephone to call his parents to obtain through them an attorney and that the parents’ attempts to locate their son, through calls to the various police stations, were frustrated by denials that the son’s whereabouts were known.
The state police officer testified, at the habeas corpus hearing, that the only charge made by him at the preliminary hearing was burglary and that there was no evidence of any larceny to his knowledge.
At the habeas corpus hearing, the then district attorney testified that he was “probably” on vacation at that time and that “probably” the larceny counts were included in the indictment to afford the court an opportunity to impose sentence on a lesser charge than burglary. The court below noted the transcript was filed on July 11, 1955, and “presumably” was not available to the district attorney’s office for use in preparing the indictment.
The sentencing judge is dead and tbe judge who held the habeas corpus hearing is his successor in office.
Under questioning by tbe habeas corpus court, counsel acknowledged McKenna could have plead not guilty without subjecting himself to a perjury charge.
Cf. Fay v. Noia, 372 U.S. 391, 440, 83 S. Ct. 822, 849.
Suspended, as of January 1, 1965, by Rule 128 of Rules of Criminal Procedure. See Rule 119, 19 P.S. (Appendix), pp. 34, 36, 37.