                 FOR PUBLICATION
 UNITED STATES COURT OF APPEALS
      FOR THE NINTH CIRCUIT

UNITED STATES OF AMERICA,             
                Plaintiff-Appellee,         No. 04-30067
               v.                            D.C. No.
JEFFREY GORDON SPEELMAN,                  CR-02-00130-RFC
             Defendant-Appellant.
                                      

UNITED STATES OF AMERICA,             
                Plaintiff-Appellee,         No. 04-30069
               v.                            D.C. No.
JEFFREY GORDON SPEELMAN,                  CR-03-00068-RFC
             Defendant-Appellant.
                                      

UNITED STATES OF AMERICA,                  No. 04-30068
                Plaintiff-Appellee,
               v.                            D.C. No.
                                          CR-02-00142-RFC
JEFFREY GORDON SPEELMAN,
                                             OPINION
             Defendant-Appellant.
                                      
       Appeal from the United States District Court
               for the District of Montana
       Richard F. Cebull, District Judge, Presiding

                 Argued and Submitted
         September 13, 2005—Seattle, Washington

                 Filed December 16, 2005
                           16415
16416           UNITED STATES v. SPEELMAN
Before: Mary M. Schroeder, Chief Judge, Arthur L. Alarcón
         and Andrew J. Kleinfeld, Circuit Judges.

               Opinion by Judge Alarcón
16418           UNITED STATES v. SPEELMAN


                      COUNSEL

Brad L. Arndorfer, Billings, Montana, for the defendant-
appellant.
                   UNITED STATES v. SPEELMAN               16419
Marcia Hurd, Assistant United States Attorney, Billings,
Montana, for the plaintiff-appellee.


                           OPINION

ALARCÓN, Circuit Judge:

   Jeffrey Speelman (“Mr. Speelman”) appeals from the dis-
trict court’s sentencing decision. He contends that the district
court erred in enhancing his sentence based on criminal con-
duct alleged in a charge dismissed pursuant to his plea bar-
gain. He also maintains that the district court violated the
Double Jeopardy Clause by applying an upward adjustment
based on the age of the victim. The Government maintains
that we cannot consider the merits of Mr. Speelman’s conten-
tions because he waived his right to file a direct appeal in his
plea agreement.

   We reject the Government’s contention that Mr. Speelman
expressly waived his right to file a direct appeal. We affirm
the district court’s sentencing decision, however, because we
conclude that the district court did not err in its interpretation
of the Sentencing Guidelines. We remand in accordance with
this court’s decision in United States v. Ameline, 409 F.3d
1023 (9th Cir. 2005) (en banc) because the court imposed its
sentence before the Supreme Court instructed that the Sen-
tencing Guidelines were not mandatory.

                                I

   Mr. Speelman was indicted on November 21, 2002. He was
charged with the Sexual Exploitation of Children, a Class A
felony, in violation of 18 U.S.C. § 2251 (Count I); Receipt of
Child Pornography, a Class C felony, in violation of 18
U.S.C. § 2252(A)(2) (Count II); Possession of Child Pornog-
raphy, a Class D felony, in violation of 18 U.S.C. § 2252
(a)(5)(B) (Count III); Forfeiture pursuant to 18 U.S.C. § 2253.
16420             UNITED STATES v. SPEELMAN
   On December 20, 2002, he was indicted and charged in two
counts with the crime of Aggravated Sexual Abuse of a Minor
who had not attained the age of twelve years, a Class A fel-
ony, in violation of 18 U.S.C. §§ 1153 and 2241(c). Mr.
Speelman was again indicted on May 23, 2005 with Abusive
Sexual Contact, a Class C felony, in violation of 18 U.S.C.
§ 2241(c).

   Mr. Speelman entered into a plea agreement on August 25,
2003. He agreed to enter a plea to Count II (receipt of child
pornography) and Count III (possession of child pornography)
of the November 21, 2002 indictment, Count II of the Decem-
ber 20, 2002 indictment (aggravated sexual abuse of a minor),
and Count II of the May 23, 2003 indictment (abusive sexual
contact). He also agreed to forward any assets in his posses-
sion and control subject to forfeiture. In exchange for these
guilty pleas, the United States Attorney for the District of
Montana agreed to dismiss the remaining counts in the indict-
ments.

   Mr. Speelman stipulated in the plea agreement that he
“knowingly, expressly and voluntarily waives the right to
contest either the conviction or the sentence or the application
of the sentencing guidelines in any post-conviction proceed-
ing including any proceeding under 28 U.S.C. § 2255.” Mr.
Speelman changed his plea to guilty pursuant to the terms of
the plea agreement on September 9, 2003.

   The United States Probation Office prepared a presentence
investigation report (“PSR”). It recommended a guideline
range of 262 to 327 months. Mr. Speelman objected on two
grounds. He asserted that the PSR erroneously cross-
referenced a Class D felony to a Class A felony that had been
dismissed. He also argued “that it would violate the Double
Jeopardy Clause to place the offense of aggravated Sexual
Abuse of a minor in the aggravated guidelines and again
increase the punishment because of the age of the child.”
Defendant/Appellant Opening Br. at 5.
                  UNITED STATES v. SPEELMAN               16421
   The district court overruled each of Mr. Speelman’s objec-
tions to the PSR and sentenced him to serve 262 months in
prison. Mr. Speelman filed a timely notice of appeal from the
district court’s sentencing decision pursuant to 18 U.S.C.
§ 3742(a).

                               II

   The Government contends that we do not have the jurisdic-
tion to consider the merits of Mr. Speelman’s direct appeal
because in his plea agreement he waived his right to contest
his sentence in any postconviction proceeding.

  [1] We review de novo whether a defendant has waived his
or her right to appeal. United States v. Portillo-Cano, 192
F.3d 1246, 1249 (9th Cir. 1999). “A defendant’s waiver of his
appellate rights is enforceable if (1) the language of the
waiver encompasses his right to appeal on the grounds raised,
and (2) the waiver is knowingly and voluntarily made.”
United States v. Jeronimo, 398 F.3d 1149, 1153 (9th Cir.
2005).

   [2] Our interpretation of the terms of the plea agreement are
controlled by the principles of contract law. See, e.g., United
States v. Sandoval-Lopez, 122 F.3d 797, 800 (9th Cir. 1997)
(“Plea bargains are contractual in nature and subject to
contract-law standards.”). We therefore will “generally
enforce the plain language of a plea agreement if it is clear
and unambiguous on its face.” Jeronimo, 398 F.3d at 1153.
“As with other contracts,” however, “provisions of plea agree-
ments are occasionally ambiguous; the government ordinarily
must bear responsibility for any lack of clarity.” United States
v. De la Fuente, 8 F.3d 1333, 1338 (9th Cir. 1993) (quotation
marks omitted).

   Under standard principles of contract interpretation, Mr.
Speelman did not waive his right to directly appeal his sen-
tence in the plea agreement. Under federal law, a defendant
16422                  UNITED STATES v. SPEELMAN
can seek correction of an allegedly illegal sentence by means
of three discrete procedures. Pursuant to Rule 35 of the Fed-
eral Rules of Criminal Procedure, “[w]ithin 7 days after sen-
tencing, the court may correct a sentence that resulted from
arithmetical, technical, or other clear error.” A defendant may
file a direct appeal “for review of an otherwise final sen-
tence.” 18 U.S.C. § 3742.1 A defendant convicted in federal
court may also collaterally attack a sentence pursuant to 28
U.S.C. § 2255 by filing a motion before the court that
imposed the sentence to vacate, set aside, or correct a sen-
tence that was imposed in violation of the Constitution or the
law of the United States.2 “An appeal may be taken to the
court of appeals from the order entered on the motion as from
a final judgment on application for a writ of habeas corpus.”
28 U.S.C. § 2255.

   Mr. Speelman did not file a motion pursuant to Rule 35,
nor has he collaterally attacked the sentence by filing a
motion in the district court pursuant to § 2255. Instead, he has
relied on the direct appeal provisions of 18 U.S.C. § 3742.
  1
   Section 3742 provides as follows in pertinent part:
        A defendant may file a notice of appeal in the district court for
      review of an otherwise final sentence if the sentence
        (1) was imposed in violation of law;
        (2) was imposed as a result of an incorrect application of the
        sentencing guidelines; or
       (3) is greater than the sentence specified in the applicable
       guideline range. . . .
  2
    Section 2255 provides in part:
         A prisoner in custody under sentence of a court established by
      Act of Congress claiming the right to be released upon the
      ground that the sentence was imposed in violation of the Consti-
      tution or laws of the United States, or that the court was without
      jurisdiction to impose such sentence, or that the sentence was in
      excess of the maximum authorized by law, or is otherwise subject
      to collateral attack, may move the court which imposed the sen-
      tence to vacate, set aside or correct the sentence.
                   UNITED STATES v. SPEELMAN                16423
   [3] The Government has failed to cite any authority to sup-
port its argument that “[t]he appeal waiver provision in this
case prohibits Speelman from any appellate action whether it
be by direct appeal or by collateral attack.” Appellee’s Sep-
tember 1, 2005 Letter Br. at 1. We note at the outset of our
discussion that the waiver provision makes no reference to a
“direct appeal” from the court’s judgment or sentence. During
oral argument, counsel for the Government forthrightly con-
ceded that the waiver provision, by failing to refer to a direct
appeal, in addition to a contest of the judgment or sentence in
any postconviction proceeding, was “not as artfully worded as
it could be and believe me it certainly will be more artfully
worded in the future.”

    [4] The mischief in the language used in its plea agreement
by the United States Attorney for the District of Montana is
the ambiguous reference to the waiver of “the right to contest
. . . the sentence . . . in any post-conviction proceeding . . . .”
(emphasis added). It is unclear whether the Government
intended that the waiver language apply to the right to file a
direct appeal from the sentence pursuant to 18 U.S.C. § 3742,
the right to file a motion in the district court for a correction
of sentence pursuant to Rule 35, or the right to file a writ of
habeas corpus in this court from the district court’s denial of
a motion to vacate, set aside, or correct a sentence pursuant
to § 2255.

   [5] In common legal usage, the term “postconviction pro-
ceeding” refers to a collateral challenge to a judgment or sen-
tence, as opposed to a direct appeal. For example, in Clay v.
United States, 537 U.S. 522 (2003), the Supreme Court held
that “[a] motion by a federal prisoner for postconviction relief
under 28 U.S.C. § 2255 is subject to a one-year time limita-
tion that generally runs from the date on which the judgment
of conviction becomes final.” Id. at 524 (emphasis added). In
Daniels v. United States, 532 U.S. 374 (2001), the Court
stated that a state court prisoner can challenge the constitu-
tionality of his conviction “on direct appeal, in postconviction
16424                  UNITED STATES v. SPEELMAN
proceedings available under state law, and in a petition for a
writ of habeas corpus brought pursuant to 28 U.S.C. § 2254
(1994 ed. and Supp. V).” Id. at 381 (emphasis added).

   [6] Counsel for the Government also advised this court that
the waiver language contained in the plea agreements drafted
by the United States Attorney’s Office for the District of
Montana is not the same as that employed by its counterparts
in the rest of the United States. In other districts, the plea
agreements require the defendant to waive both his or her
right to appeal the merits of the judgment and sentence, and
to contest the judgment and sentence in any postconviction
proceeding. See e.g., United States v. Lockwood, 416 F.3d
604, 605 n.1 (7th Cir. 2005) (defendant agreed “not to contest
my conviction, sentence, or the manner in which my convic-
tion and sentence was determined on any ground in any
appeal . . . or in any post-conviction proceeding”). The plea
agreement in this matter did not state with sufficient clarity
that by waiving his right to contest his sentence in postconvic-
tion proceedings, he was also giving up his right to file a
direct appeal. See De La Fuente, 8 F.3d at 1337 (“In constru-
ing an agreement, the court must determine what the defen-
dant reasonably understood to be the terms of the agreement
when he pleaded guilty.”) (citation omitted). Since ambigui-
ties in plea agreements are construed against the Government,
United States v. Franco-Lopez, 312 F.3d 984, 989 (9th Cir.
2002), we conclude that Mr. Speelman did not knowingly and
voluntarily waive his right to file a direct appeal from the sen-
tence imposed by the district court.

                                      III

                                      A

  Mr. Speelman argues that the district court erred in apply-
ing the § 2G2.2(c)(1) cross-reference on the basis of dis-
missed conduct.3 This court reviews the district court’s
  3
   Section 2G2.2(c)(1) provides:
      If the offense involved causing, transporting, permitting, or offer-
                     UNITED STATES v. SPEELMAN                      16425
application of the Sentencing Guidelines de novo. United
States v. Nielsen, 371 F.3d 574, 582 (9th Cir. 2004). Mr.
Speelman’s argument is foreclosed by this Court’s decision in
United States v. Wright, 373 F.3d 935 (9th Cir. 2004).

   [7] The Sentencing Guidelines make clear that a cross-
reference may be applied on the basis of relevant conduct
alleged on charges dismissed pursuant to a plea agreement.
“Under U.S.S.G. § 1B1.3(a), cross-references ‘shall’ be deter-
mined on the basis of relevant conduct.” Wright, 373 F.3d at
945. Relevant conduct includes all acts and omissions com-
mitted or willfully caused by the defendant “that occurred
during the commission of the offense of conviction, in prepa-
ration for the offense, or in the course of attempting to avoid
detection or responsibility for that offense.” U.S.S.G.
§ 1B1.3(a).4 Moreover, § 6B1.2(a) provides that “a plea

     ing or seeking by notice or advertisement, a minor to engage in
     sexually explicit conduct for the purpose of producing a visual
     depiction of such conduct, apply § 2G2.1 (Sexually Exploiting a
     Minor by Production of Sexually Explicit Visual or Printed Mate-
     rial; Custodian Permitting Minor to Engage in Sexually Explicit
     Conduct; Advertisement for Minors to Engage in Production), if
     the resulting offense level is greater than that determined above.
  4
    Section 1B1.3(a) provides:
    Unless otherwise specified, (i) the base offense level where the
    guideline specifies more than one base offense level, (ii) specific
    offense characteristics and (iii) cross references in Chapter Two,
    and (iv) adjustments in Chapter Three, shall be determined on the
    basis of the following:
        (1)(A) all acts and omissions committed, aided, abetted,
        counseled, commanded, induced, procured, or willfully
        caused by the defendant; and
        (B) in the case of a jointly undertaken criminal activity (a
        criminal plan, scheme, endeavor, or enterprise undertaken by
        the defendant in concert with others, whether or not charged
        as a conspiracy), all reasonably foreseeable acts and omis-
        sions of others in furtherance of the jointly undertaken crimi-
16426                UNITED STATES v. SPEELMAN
agreement that includes the dismissal of a charge or a plea
agreement not to pursue a potential charge shall not preclude
the conduct underlying such charge from being considered
under the provisions of § 1B1.3 (Relevant Conduct) in con-
nection with the count(s) of which the defendant is convict-
ed.” The district court did not err in applying the cross-
reference set forth in § 2G2.2(c)(1).

                                   B

   Mr. Speelman also contends that the district court erred in
applying the cross-reference on the basis of conduct over
which the district court lacked jurisdiction. Mr. Speelman
asserts that the United States lacked jurisdiction to prosecute
him for his production of the illicit photographs due to this
court’s decision in United States v. McCoy, 323 F.3d 1114
(9th Cir. 2003). In McCoy, we held that 18 U.S.C. § 2252(a)
was unconstitutional as applied to the simple intrastate pos-
session of child pornography. Id. at 1115. Mr. Speelman’s
reliance on McCoy is misplaced.

   [8] A district court may base a § 2G2.2(c)(1) cross-
reference on the basis of conduct over which the federal gov-

        nal activity, that occurred during the commission of the
        offense of conviction, in preparation for that offense, or in
        the course of attempting to avoid detection or responsibility
        for that offense;
        (2) solely with respect to offenses of a character for which
        § 3D1.2(d) would require grouping of multiple counts, all
        acts and omissions described in subdivisions (1)(A) and
        (1)(B) above that were part of the same course of conduct or
        common scheme or plan as the offense of conviction;
        (3) all harm that resulted from the acts and omissions speci-
        fied in subsections (a)(1) and (a)(2) above, and all harm that
        was the object of such acts and omissions; and
        (4) any other information specified in the applicable guide-
        line.
                  UNITED STATES v. SPEELMAN               16427
ernment would lack jurisdiction to prosecute. See United
States v. Dawn, 129 F3d 878, 881 (7th Cir. 1997) (“whether
or not section 2251(a) criminalizes the pornography-related
exploitation of minors in foreign countries by American citi-
zens is ultimately immaterial.”). Like the defendant in Dawn,
Mr. Speelman complains that the district court improperly
applied a § 2G2.2(c)(1) cross-reference on the basis of con-
duct that is beyond the jurisdictional reach of 18 U.S.C.
§ 2251(a). As in Dawn, the “fatal flaw” in Mr. Speelman’s
argument is his assumption “that because he was sentenced as
if he were convicted for producing the pornography, he was
sentenced in fact for producing child pornography.” 129 F.3d
at 883.

   [9] It is irrelevant whether the district court applied the
§ 2G2.2(c)(1) cross-reference on the basis of conduct for
which the federal government could not prosecute him. Id. at
884-85. Cf. United States v. Williams, 217 F.3d 751, 754 (9th
Cir. 2000) (holding that “a district court may consider as rele-
vant conduct for sentencing purposes actions which may be
barred from prosecution by the applicable statute of limita-
tions”); United States v. Carroll, 3 F.3d 98, 102 (4th Cir.
1993) (holding that a district court could apply § 2K2.1(c)(2)
cross-reference to conduct punishable only under state law,
reasoning that “[i]n applying the cross-reference as directed
by the guidelines, a sentencing court does not punish a defen-
dant for a state offense over which a federal court has no
jurisdiction”); United States v. Newbert, 952 F.2d 281, 284
(9th Cir. 1991) (holding that “non-federal conduct can fall
within the jurisdiction of § 1B1.3(a)(2) of the federal guide-
lines”).

                               C

  Mr. Speelman further contends that the § 2G2.2(c)(1)
cross-reference applied by the district court exceeded the five-
year maximum term of imprisonment for possession of child
pornography. Mr. Speelman was sentenced to five years on
16428               UNITED STATES v. SPEELMAN
the possession of child pornography count. Accordingly, the
district court did not err in applying the § 2G.2(c)(1) cross-
reference in this case.

                                  D

   Mr. Speelman objects to the application of a sentencing
enhancement pursuant to § 2A3.1(b)(2)(A). He contends the
district court violated his rights under the Double Jeopardy
Clause by applying the enhancement. He asserts that the dis-
trict court’s application of the § 2A3.1(b)(2)(A)5 constituted
impermissible double-counting. Mr. Speelman pled guilty to
one count of aggravated sexual abuse of a child under the age
of twelve in violation of 18 U.S.C. § 2241(c). The district
court applied a four-level upward enhancement to this count
because Mr. Speelman’s victim was not yet twelve years old
at the time of the offense. See U.S.S.G. § 2A3.1(b)(2)(A)
(providing for this enhancement). Mr. Speelman maintains the
victim’s age was already accounted for in the underlying
count of conviction.

   [10] Impermissible double counting “occurs where one part
of the Guidelines is applied to increase a defendant’s punish-
ment on account of a kind of harm that has already been fully
accounted for by the application of another part of the Guide-
lines.” United States v. Reese, 2 F.3d 870, 895 (9th Cir. 1993).

      Thus, the use of a single aspect of conduct both to
      determine the applicable offense guideline and to
      increase the base offense level mandated thereby
      will constitute impermissible double counting only
      where, absent such conduct, it is impossible to come
      within that guideline. If, on the other hand, it is pos-
      sible to be sentenced under a particular offense
      guideline without having engaged in a certain sort of
  5
   Section 2A3.1(b)(2)(A) provides: “If the victim had not attained the
age of twelve years, increase by 4 levels.”
                   UNITED STATES v. SPEELMAN               16429
    behavior, such behavior may be used to enhance the
    offense level, for in this situation, the guideline’s
    base offense level will not necessarily have been set
    to capture the full extent of the wrongfulness of such
    behavior.

Id. Accordingly, we must decide whether the defendant could
have been sentenced pursuant to U.S.S.G. § 2A3.1 for a con-
viction under 18 U.S.C. § 2241 without having committed
sexual abuse of a child under the age of twelve. See id.

  [11] Section 2A3.1 applies to both aggravated sexual
assault in violation of 18 U.S.C. § 2241 and simple sexual
assault in violation of 18 U.S.C. § 2242. See U.S.S.G. § 2A3.1
commentary. It is not an element of § 2242 that the victim be
under the age of twelve. Further, a conviction for aggravated
sexual abuse under 18 U.S.C. § 2241(a) and (b) does not
require a showing that the victim was under the age of twelve.
Accordingly, it is possible to be sentenced under § 2A3.1
without having victimized a child under the age of twelve. See
United States v. Wimberly, 60 F.3d 281, 288 (7th Cir. 1995)
(holding that “the enhancement for victims under 12 years of
age, § 2A3.1(b)(2), does not constitute impermissible double
counting”); United States v. Balfany, 965 F.2d 575, 584 (8th
Cir. 1992) (same); United States v. Ransom, 942 F.2d 775,
778-79 (10th Cir. 1991) (same). The district court did not
engage in impermissible double counting when it applied a
four-level enhancement to Mr. Speelman’s sentence for
aggravated sexual abuse.

                               E

   [12] It is unclear from this record whether the district court
would have imposed a different sentence if it had known that
the application of the Sentencing Guidelines was not manda-
tory. While the district court expressed repugnance with Mr.
Speelman’s conduct, stating that he hoped never to “read
about this kind of conduct by somebody against young girls
16430                UNITED STATES v. SPEELMAN
again in my tenure on the bench,” the court also sentenced
Mr. Speelman to the low end of the Sentencing Guidelines
range. We conclude that the district court properly interpreted
the Sentencing Guidelines. We remand, however, in accor-
dance with Ameline.6

  AFFIRMED IN PART; REMANDED IN PART.




   6
     To the extent Mr. Speelman argues his waiver should be disregarded
because of the intervening change of law occasioned by United States v.
Booker, 125 S. Ct. 738 (2004), his argument is foreclosed by United States
v. Cardenas, 405 F.3d 1046, 1048 (9th Cir. 2005) (rejecting a defendant’s
argument that his waiver of his right to appeal was involuntary and
unknowing because it preceded Booker).
