opinion: Dorothy COLLINS, on Behalf of Her Minor Children, James COLLINS, Dorothy Collins and Warren Collins, Individually and on Behalf of All Others Similarly Situated, Plaintiff-Appellee (86-4024), Linda Elam, Plaintiff-Appellee (87-3070/3139), Cross-Appellant (87-3138), v. Patricia K. BARRY, Director of the Ohio Department of Human Services, Defendant-Appellant (86-4024, 87-3070), Cross-Appellee (87-3138), Otis Bowen, Individually and in His Official Capacity as Secretary of Health and Human Services, Defendant-Appellant (87-3139).
  Nos. 86-4024, 87-3070, 87-3138 and 87-3139.
  United States Court of Appeals, Sixth Circuit.
  Argued Jan. 28, 1988.
  Decided March 21, 1988.
  Dennis G. Nealon (argued), Asst. Atty. Gen., Columbus, Ohio, for defendant-appellant in Nos. 86-4024, 87-3070 and 87-3138.
  Robert H. Bonthius, Jr. (argued), Legal Aid Soc. of Cleveland, Cleveland, Ohio, for plaintiff-appellee in No. 86-4024.
  James O’Connor (argued), R. Gregory Park, Legal Aid Soc. of Cincinnati, Cincinnati, Ohio, and Barbara J. Cook, for plaintiff-appellee, cross-appellant in Nos. 87-3070, 87-3138 and 87-3139.
  Donetta D. Wiethe, Asst. U.S. Atty., Cincinnati, Ohio, Thomas M. Jackson (argued), Asst. Reg. Council, Chicago, Ill., William Kanter, Carlene V. McIntyre, Appellate Staff-Civ. Div., Dept, of Justice, Washington, D.C., for defendant-appellant in No. 87-3139.
  Before MILBURN and GUY, Circuit Judges, and CONTIE, Senior Circuit Judge.
  MILBURN, Circuit Judge.
  In these consolidated appeals, defendants-appellants Patricia Barry, Director of the Ohio Department of Human Services (“Director”), and Otis Bowen, Secretary of Health and Human Services (“Secretary”), appeal the orders of the district courts granting preliminary and permanent injunctions and holding that the policies of the defendants implementing the Aid to Families with Dependent Children (“AFDC”) program family filing unit provision of the Deficit Reduction Act of 1984 (“DEFRA”) are violative of federal law. For the reasons that follow, we reverse the judgments of the district courts and vacate the injunctions.
  I.
  A.
  No. 86-40% — Northern District of Ohio
  One of the consolidated appeals originates out of a class action filed by plaintiff Collins in the district court on October 15, 1969. In that action, Collins claimed that the Director’s inclusion of Old Age, Survivors, and Disability Insurance (“OASDI” or “Title II”) benefits and recipients within the standard filing unit used to determine AFDC eligibility was contrary to federal law and therefore should be enjoined. On January 22, 1971, the district court certified Collins’ action as a class action, found for plaintiffs and issued an injunction prohibiting the complained of actions.
  On May 2, 1986, plaintiff Collins filed a motion to show cause alleging that the Director had unjustifiably violated the injunction issued on January 22, 1971, by again considering OASDI benefits and recipients as part of the AFDC filing unit. The Director claimed that statutory changes enacted by DEFRA undercut the basis for the injunction, and therefore it was no longer valid. Accordingly, on these grounds, the Director filed on June 11, 1986, a motion for relief from judgment pursuant to Rule 60(b) of the Federal Rules of Civil Procedure. Since both motions required the district court to construe 42 U.S.C. § 602(a)(38), the motions were decided jointly.
  On September 19,1986, the district court issued an order finding the Director in contempt of its January 22, 1971, injunction. The Director’s motion for relief from judgment was denied. Collins v. Barry, 644 F.Supp. 249 (N.D. Ohio 1986). On September 30, 1986, the Director filed a notice of appeal and a motion to stay enforcement of the order pending appeal to this court. The stay was granted.
  B.
  Nos. 87-3070; 87-3138; 87-3139 — Southern District of Ohio
  On February 12, 1986, plaintiff Elam filed an action against the Director in the district court for herself and as next friend for her daughter, Tina Brayton. Among other things, Elam alleged that the state had incorrectly counted the OASDI benefits received by Tina, as a coresident sibling, in determining the AFDC eligibility of her household. On March 13, 1986, the state impleaded the Secretary as a party defendant, and on March 27, 1986, Elam filed an amended complaint in which she asserted that the Secretary’s regulatory guidelines were contrary to federal law. Elam also sought certification of a class and both preliminary and permanent in-junctive relief.
  The Secretary and the Director filed memoranda in opposition to Elam’s motion to certify and her motion for preliminary and permanent injunction. Subsequently, the district court denied Elam’s motion to certify her cause as a class action, but, relying on Collins, granted the request for injunctive relief. Elam v. Barry, 656 F.Supp. 140 (S.D. Ohio 1986). Judgment was entered on December 31, 1986.
  On January 16, 1987, the Director moved to stay enforcement of the district court’s order pending appeal and filed its notice of appeal, and the district court granted the Director’s motion to stay enforcement on January 21, 1987. The Secretary filed a timely notice of appeal, and plaintiff Elam likewise filed a timely notice of appeal from the court’s denial of class certification.
  On February 23, 1987, this court sua sponte entered an order staying proceedings in these consolidated appeals until the United States Supreme Court rendered a decision in Gilliard v. Kirk, Supreme Court No. 86-564. That opinion was rendered on June 25, 1987. Bowen v. Gilliard, — U.S. —, 107 S.Ct. 3008, 97 L.Ed. 2d 485 (1987).
  II.
  A.
  Plaintiffs initially challenge the state and federal regulations implementing DEFRA’s redefinition of the AFDC family filing unit, 42 U.S.C. § 602(a)(38). In Bradley v. Austin, 841 F.2d 1288 (6th Cir.1988), also decided today, the same federal statute and regulations and virtually identical state regulations were challenged. In Bradley, where the same statutory arguments were raised, we held that the regulations are consistent with the statute authorizing them and with federal law governing Title II social security benefits. Bradley controls our decision in this case on these issues.
  B.
  However, the Collins case comes to us in a different procedural posture than Bradley and has an additional issue for this court to resolve. Plaintiff Collins contends that if this court should find, as it does, that the regulations in question do not violate federal law, we should still affirm the district court’s finding that the Director was in contempt of court. Collins argues that even if the law upon which the injunction was based had changed, the Director was still bound by the injunction until it was modified or vacated by the court entering the injunction, and therefore was properly found in contempt and was properly ordered to restore benefits reduced or terminated as a result of the regulatory change.
  While the invalidity of a court order is generally not a defense in a criminal contempt proceeding alleging disobedience of the order, Fernos-Lopez v. United States District Court, 599 F.2d 1087, 1091 (1st Cir.) (per curiam), cert. denied, 444 U.S. 931, 100 S.Ct. 275, 62 L.Ed.2d 189 (1979), “a finding of civil contempt is invalidated if the underlying order is invalidated.” Squillacote v. Local 248, Meat & Allied Food Workers, 534 F.2d 735, 746 (7th Cir.1976); see also Ager v. Jane C. Stormont Hospital and Training School for Nurses, 622 F.2d 496, 499 (10th Cir.1980). “A party held only in civil contempt by way of compensation to his adversary will be absolved of liability if the court order was invalid or erroneous[, as] [t]he adversary should realize no gain from orders to which he was not entitled. Norman Bridge Drug Co. v. Banner, 529 F.2d 822, 828 (5th Cir.1976); see United States v. Campbell, 761 F.2d 1181, 1185 (6th Cir.1985) (“a party cannot be held in civil contempt of an order that is itself not valid.”).
  “[T]he objective of a civil contempt decree is to benefit the complainant.” Latrobe Steel Company v. United Steelworkers of America, 545 F.2d 1336, 1343 (3d Cir.1976). Thus, the distinction between civil and criminal contempt should be illustrated.
  The primary purpose of a criminal contempt is to punish defiance of a court’s judicial authority. Accordingly, the normal beneficiaries of such an order are the courts and the public interest. On the other hand, civil contempt is characterized by the court’s desire “to compel obedience of the court order or to compensate the litigant for injuries sustained from the disobedience.” The remedial aspects outweigh the punitive considerations. Thus, the primary beneficiaries of such an order are the individual litigants. The judicial system benefits to a lesser extent.
  Ager, 622 F.2d at 499-500 (citations omitted) (emphasis in original).
  In this case, plaintiff Collins and her class were not damaged by the defendant’s actions in violation of the injunction. On October 1, 1984, as required by DEFRA, the Director amended Ohio law to conform with the requirements of 42 U.S.C. § 602(a)(38). As of that date, plaintiff Collins and her class were no longer entitled to benefits as determined by the prior law. Therefore, they were not harmed as a result of the Director’s action, since, under the law, they were receiving all the benefits to which they were entitled. As civil contempt seeks to remedy a deprivation or a loss, and not to create additional rights, the district court erred in finding defendant Barry in contempt and awarding a restoration of reduced or terminated benefits as a remedy. See Gilliard, 107 S.Ct. at 3015, n. 12 (“ruling that the DEFRA amendment is constitutionally valid requires reversal of both the district court’s award of prospective relief and its award of retroactive relief.”).
  III.
  Accordingly, the judgments of both district courts are REVERSED and VACATED. We REMAND the cases to the respective district courts from which these appeals arose with instructions to enter judgments for the defendants.
  . As we hold that the district court erroneously granted injunctive relief, we need not reach plaintiff Elam’s contention in her cross-appeal that the district court erroneously denied her class certification.
instruction: What follows is an opinion from a United States Court of Appeals.
  Intervenors who participated as parties at the courts of appeals should be counted as either appellants or respondents when it can be determined whose position they supported. For example, if there were two plaintiffs who lost in district court, appealed, and were joined by four intervenors who also asked the court of appeals to reverse the district court, the number of appellants should be coded as six.
  In some cases there is some confusion over who should be listed as the appellant and who as the respondent. This confusion is primarily the result of the presence of multiple docket numbers consolidated into a single appeal that is disposed of by a single opinion. Most frequently, this occurs when there are cross appeals and/or when one litigant sued (or was sued by) multiple litigants that were originally filed in district court as separate actions. The coding rule followed in such cases should be to go strictly by the designation provided in the title of the case. The first person listed in the title as the appellant should be coded as the appellant even if they subsequently appeared in a second docket number as the respondent and regardless of who was characterized as the appellant in the opinion.
  To clarify the coding conventions, consider the following hypothetical case in which the US Justice Department sues a labor union to strike down a racially discriminatory seniority system and the corporation (siding with the position of its union) simultaneously sues the government to get an injunction to block enforcement of the relevant civil rights law. From a district court decision that consolidated the two suits and declared the seniority system illegal but refused to impose financial penalties on the union, the corporation appeals and the government and union file cross appeals from the decision in the suit brought by the government. Assume the case was listed in the Federal Reporter as follows:
  United States of America,
  Plaintiff, Appellant
  v
  International Brotherhood of Widget Workers,AFL-CIO
  Defendant, Appellee.
  International Brotherhood of Widget Workers,AFL-CIO
  Defendants, Cross-appellants
  v
  United States of America.
  Widgets, Inc. & Susan Kuersten Sheehan, President & Chairman
  of the Board
  Plaintiff, Appellants,
  v
  United States of America,
  Defendant, Appellee.
  This case should be coded as follows:Appellant = United States, Respondents = International Brotherhood of Widget Workers Widgets, Inc., Total number of appellants = 1, Number of appellants that fall into the category "the federal government, its agencies, and officials" = 1, Total number of respondents = 3, Number of respondents that fall into the category "private business and its executives" = 2, Number of respondents that fall into the category "groups and associations" = 1.
  Your task is to identify the state of the first listed state or local government agency that is an appellant.
choices: not Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachussets Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New New New New North North Ohio Oklahoma Oregon Pennsylvania Rhode South South Tennessee Texas Utah Vermont Virginia Washington West Wisconsin Wyoming Virgin Puerto District Guam not Panama