Coy Ray Phelps, an insanity acquittee, appeals the district court’s denial of his habeas corpus petition and the district court’s grant *737of summary judgment in favor of defendants in his Bivens1 action in these consolidated appeals. We affirm in part and reverse in part, and remand to the district court for further consideration.
In October 1985, Phelps was charged with making, possessing, and planting pipe bombs at various locations in San Francisco. In July 1986, a jury found Phelps not guilty by reason of insanity on all counts. After conducting a commitment hearing pursuant to the procedures set out in 18 U.S.C. §§ 4243 and 4247, a California district court found “that Phelps was suffering from a severe mental disease and that there was clear and convincing evidence that [his] release “would create a substantial risk of bodily injury to persons and serious damage of property of others’ due to that disease.” Phelps v. United States, 831 F.2d 897, 897-98 (9th Cir.1987). The court committed Phelps pursuant to section 4243(e). See id. at 898.
Phelps then filed his first habeas petition arguing that sections 4243 and 4247 were unconstitutionally vague and overbroad. The Ninth Circuit affirmed the district court’s denial of the petition. Id. In April 1987, Phelps was transferred to the Federal Medical Center in Springfield. In September 1991, he was transferred to the Federal Medical Center in Rochester. While Phelps was residing at FMC Springfield, he filed a second habeas petition that was denied as moot after he was transferred to FMC Rochester.' No. 92-2685
In November 1991, Phelps filed this, his third, 28 U.S.C. § 2241 habeas petition arguing that sections 4243 and 4247 are unconstitutional; that he is treated as if he had been convicted; and that he should have been committed to the custody of the Surgeon General, not the Attorney General. He also alleged that FMC Rochester is not a hospital for treatment, but a prison.2 In a subsequent pleading, Phelps also alleged that FMCs are not “suitable facilities.”3 Phelps requested appointment of counsel, and it is evident that he desired release or transfer to a hospital facility for treatment.
The district court treated Phelps’s complaint as a section 4247 habeas petition and concluded that Phelps raised only one claim, that sections 4243 and 4247 are unconstitutional as applied to him. The court also concluded that the claim was barred as an abuse of the writ under section 2244(a). Accordingly, the district court denied Phelps’s motion for appointment of counsel and his petition.
The district court’s refusal to appoint counsel was not an abuse of discretion. See Williams v. Groose, 979 F.2d 1335, 1337 (8th Cir.1992) (per curiam). Phelps is an experienced litigant, and he failed to present any evidence on appeal that appointed counsel could have helped him or the court. While Phelps had a constitutional right to counsel at his initial commitment proceeding and on direct appeal, and he has a statutory right to counsel during his periodic reevaluation hearings, see section 4247(d), he had no constitutional right to counsel in habeas proceedings. See Comman v. Armontrout, 959 F.2d 727, 730 (8th Cir.1992). The fact that Phelps is committed to an FMC is merely a factor to be considered when determining if appointment of counsel will benefit the litigant and the court. Phelps’s argument that he was entitled to counsel, based on Alford v. United States, 709 F.2d 418 (5th Cir.1983), is misplaced because when the district court denied counsel, it had yet to determine that an evidentiary hearing would be required and Phelps is not indigent — he has always paid the required filing fees and has not *738moved to proceed in forma pauperis. See id. at 423.
The district court did not abuse its discretion by dismissing as an abuse of the writ Phelps’s claims that sections 4243 and 4247 are unconstitutional as applied. See Williams, 979 F.2d at 1387. Phelps admitted that he discussed this issue with his attorney prior to filing his first habeas petition. See Williams v. Lockhart, 862 F.2d 155, 158-59 (8th Cir.1988) (petitioner must show claim “is based on facts or legal theories of which he had no knowledge when prosecuting his prior habeas petition”). The district court correctly ruled that Phelps’s ignorance of the law is not “cause” to excuse his abuse of the writ, see id., and that attorney error does not constitute cause to excuse a petitioner’s failure to raise a cognizable claim in an earlier habeas petition, see McCleskey v. Zant, 499 U.S. 467, 497, 111 S.Ct. 1454, 1472, 113 L.Ed.2d 517 (1991); Cornman, 959 F.2d at 730.
The district court also found that Phelps “was fully capable of arguing the issues” in his earlier petition, and that his allegations of mental deficiencies “are directly contradicted by the quality of the three habeas corpus applications previously filed by [him].” While all of Phelps’s medical files are not included in the record, we can find no inference that Phelps was unable to understand the legal proceedings in which he was participating. We agree, therefore, that Phelps’s mental problems do not constitute cause for his failure to include these claims in his previous petitions. See Coleman v. Thompson, — U.S. -, -, 111 S.Ct. 2546, 2566, 115 L.Ed.2d 640 (1991) (“cause ... must be something external to the petitioner, something that cannot fairly be attributed to him”); Stanley v. Lockhart, 941 F.2d 707, 709-10 (8th Cir.1991) (petitioner must present conclusive evidence of mental disease, disorder, or defect). In addition, we conclude that Phelps has not shown that “a fundamental miscarriage of justice would result from a failure to entertain the claim.” McCleskey, 499 U.S. at 1469, 111 S.Ct. at 1470.
Phelps’s claim that he should be under the custody of the Surgeon General is meritless. Section 4243(e) specifically provides that Phelps, and others similarly situated, shall be committed “to the custody of the Attorney General.”
We conclude Phelps’s claim that FMC Rochester is not a suitable facility is now moot. After his appeal was filed, Phelps was transferred back to FMC Springfield. We note that this is Phelps’s second habeas petition to be denied as moot as a result of transfers and trust that a pattern is not developing. Accordingly, we affirm the district court’s denial of Phelps’s habeas petition.
No. 92-3670
In February 1992, Phelps filed a Bivens complaint asserting numerous claims against numerous defendants. The government moved to dismiss arguing that some defendants were entitled to absolute immunity, some were entitled to qualified immunity, some claims were barred by collateral estop-pel or res judicata, and the complaint failed to state a claim.
The district court found that Phelps stated thirteen causes of action, some with subparts. The court treated the motion to dismiss as a motion for summary judgment because defendants submitted materials outside of the pleadings to support the motion. The court dismissed without prejudice all “unknown defendants” because the court could find “no basis for identifying these individuals.” The district court concluded that the federal government was entitled to sovereign immunity, and that Phelps sued individual defendants Dick Thornburgh, J. Michael Quinlan, Peter M. Carlson, Dr. Ruth Westrick, Dr. Foster, B. Kosmieki, and the John Doe directors of various named agencies only in their official capacities and, therefore, they were entitled to sovereign immunity. The court also concluded that defendants Rochester Methodist Hospital and the Mayo Clinic were not acting as federal agents and, therefore, Phelps failed to state a Bivens claim against them; that statutes “named” by Phelps were not proper defendants in a civil law suit; and that all remaining defendants were entitled *739to summary judgment because Phelps failed to state a claim against them, in that his allegations did not rise to the level of a constitutional violation, or because the remaining defendants were entitled to qualified immunity. Phelps appealed.4
The district court improperly granted summary judgment because it did not notify Phelps of its intention to so treat the motion to dismiss, the court did not give Phelps an opportunity to respond to the motion, and the record does not support summary judgment. See Layton v. United States, 919 F.2d 1388, 1334-35 (8th Cir.1990) (court must give non-movant an opportunity to respond after it converts a motion to dismiss to a motion for summary judgment). Having carefully reviewed the record, however, we conclude that most of Phelps’s allegations fail to state a claim and therefore, any error with respect to those claims was harmless. See Gibb v. Scott, 958 F.2d 814, 816 (8th Cir.1992) (standard of review). We also conclude that Phelps’s claim that the federal government is not entitled to sovereign immunity is meritless, see Laswell v. Brown, 683 F.2d 261, 268 (8th Cir.1982) (“Bivenstype action cannot be prosecuted against the United States government”), cert. denied, 459 U.S. 1210, 103 S.Ct. 1205, 75 L.Ed.2d 446 (1983); that the district court did not err by dismissing the “unknown defendants” without prejudice; that the court did not err in dismissing those defendants sued in their official capacities (Thornburgh, Quinlan, Carlson, Westrick, Foster, Kosmicki, and the John Doe directors of various named agencies); and that the court did not err in “dismissing” the statutes. We remand for further consideration, however, three of Phelps’s claims.
Phelps alleged that he was placed in seclusion at FMC Rochester when he refused to answer questions because he thought that the answers might amount to self-incrimination. The privilege against self-incrimination is “‘as broad as the mischief against which it seeks to guard,’ ... and [it] is fulfilled only when a criminal defendant is guaranteed the right to ‘remain silent unless he chooses to speak in the unfettered exercise of his own will, and to suffer no penalty ... for such silence.’ ” Estelle v. Smith, 451 U.S. 454, 467-68, 101 S.Ct. 1866, 1875-76, 68 L.Ed.2d 359 (1981) (quoted cases omitted). Before an inmate can be compelled to provide testimony in a prison disciplinary hearing that might incriminate him in later criminal proceedings, the inmate must be offered whatever immunity is required to supplant the privilege and may not be required to waive such immunity. See Baxter v. Palmigiano, 425 U.S. 308, 316, 96 S.Ct. 1551, 1556, 47 L.Ed.2d 810 (1976). We believe that the same must be true in Phelps’s case. On remand, Phelps should be given an opportunity to amend his complaint to provide greater detail. If the questions that Phelps refused to answer concerned the crimes to which he had already been found not guilty by reason of- insanity, there is no reason for the Fifth Amendment protection, and he would fail to state a claim. See United States v. Phelps, 955 F.2d 1258, 1264 n. 10 (9th Cir.), cert. denied, — U.S. -, 112 S.Ct. 2977, 119 L.Ed.2d 595 (1992). On the other hand, if Phelps was asserting the privilege because he was being asked about criminal conduct for which he could still be charged, he may be able to state a claim that he is entitled to assert his Fifth Amendment privilege and hospital officials are precluded from punishing him for exercising that right. See id. at 1264.
Phelps’s claims that officials at FMC Rochester “seized” his outgoing and incoming mail, read it, and then placed it in storage, and that officials opened and read his incoming legal mail outside of his presence also requires further consideration. Phelps admitted that his legal mail was not marked private or confidential, but he argues that defendants could clearly tell that it was legal mail because it had a law firm’s return address. We rejected this argument in Harrod v. Halford, 773 F.2d 234, 235-36 (8th Cir.1985) (per curiam), cert. denied, 476 U.S. 1143, 106 S.Ct. 2254, 90 L.Ed.2d 699 (1986). *740We conclude, however, that Phelps stated a claim against several FMC Rochester employees for interference with his personal mail: keeping in storage boxes of letters sent to him and by him without ever telling him that the letters he wrote were not mailed or that letters sent to him were not being delivered. A prisoner’s constitutional right to send and receive mail may be restricted only for legitimate penological interests. See Thornburgh v. Abbott, 490 U.S. 401, 407, 413, 109 S.Ct. 1874, 1878, 1881, 104 L.Ed.2d 459 (1989); Bumgarner v. Bloodworth, 768 F.2d 297, 301 (8th Cir.1985) (per curiam) (intruding into prisoner’s personal mail for security reasons is constitutional). While defendants may be able to come forth with legitimate reasons for interfering with Phelps’s mail, Phelps stated sufficient allegations to survive a motion to dismiss. On remand, Phelps should be given an opportunity to amend his complaint and an opportunity to properly serve the defendants for whom the district court clerk refused to issue a summons initially.
Finally, Phelps alleged that he was repeatedly punished and medicated for exercising his religious beliefs and for refusing to attend institutional meetings held in the chapel. On remand, the district court should permit Phelps to amend his complaint to clarify the tenets of his religion, and to plead that his beliefs are sincerely held and that they are religious in nature. Cf United States v. Ward, 989 F.2d 1015, 1017-18 (9th Cir.1992); Ferguson v. C.I.R., 921 F.2d 588, 589 (5th Cir.1991) (per curiam). We recognize that defendants may be entitled to summary judgment if they can show a penological justification for their actions. Cf. Iron Eyes v. Henry, 907 F.2d 810, 813 (8th Cir.1990). We believe, however, that Phelps should be permitted to proceed with this claim.
Accordingly, we affirm in part and reverse in part, and remand to the district court for further proceedings consistent with this opinion.
. See Bivens v. Six Unknown Named Agents of the Fed. Bureau of Narcotics, 403 U.S. 388, 91 S.Ct. 1999, 29 L.Ed.2d 619 (1971).
. Phelps also alleged that he was arbitrarily placed in multi-occupancy cells without adequate screening, safeguards, or other protections. Later, however, he abandoned this claim. On appeal, Phelps raises several additional issues for the first time. We do not consider the abandoned claim, see Johnson v. Lockhart, 944 F.2d 388, 389 n. 3 (8th Cir.1991), or the claims'raised for the first time on appeal, see Ryder v. Morris, 752 F.2d 327, 332 (8th Cir.), cert. denied, 471 U.S. 1126, 105 S.Ct. 2660, 86 L.Ed.2d 276 (1985).
.A " ‘suitable facility’ means a facility that is suitable to provide care or treatment given the nature of the offense and the characteristics of the defendant.” 18 U.S.C. § 4247(a)(2).
. Phelps raises several issues for the first time on appeal. We do not consider those claims. See Ryder, 752 F.2d at 332.