In this case, we must decide whether the defendant Hernandez’s presence in the rear seat of a vehicle containing commercial quantities of illegal drugs, in conjunction with all the other circumstances known to the arresting officers, created probable cause to arrest him.
I
On August 21, 2001, Benito Hernandez was sitting in the rear seat of his uncle’s Ford Windstar Minivan when the vehicle entered the United States from Mexico. Hernandez’s uncle and aunt respectively sat in the front driver seat and front passenger seat of the minivan. At the primary inspection area, a narcotics detector dog alerted to the presence of narcotics in the minivan. After the dog alert, Senior Customs Inspector Edwin Smura obtained a declaration from the driver, checked the legal status of the occupants, and asked the driver where he was going in the United States and where he was coming from in Mexico. While conducting this questioning, Inspector Smura noted that, “[the van’s passengers] all seemed very nervous; very stiff, no eye contact, and [Jose Diaz, the driver,] seemed very slow to answer questions.”
After this questioning, Inspector Smura used a density meter to check the vehicle and obtained a very high reading on the driver’s side of the van. Next, Smura asked the driver, Jose Diaz, to step out of the van. Smura searched the inside of the driver’s door and saw clear plastic wrapped packages that he believed contained illegal drugs.
The three occupants of the minivan were then handcuffed and escorted to a secondary security office where the handcuffs were removed. The occupants were required to wait on a bench. About five to ten minutes after the three occupants were taken to the security office, the contents of the packages were confirmed to be marijuana, which was later determined to weigh 44.20 kilograms (97.24 pounds). At this point all three occupants of the minivan, including Hernandez, were again handcuffed, and Hernandez was advised of his Miranda rights. Hernandez chose to make a statement and admitted that he was being paid $500 to act as “window dressing” to facilitate the smuggling of the marijuana by giving the impression of an innocent family returning from vacation.
*433On December 12, 2001, Hernandez pled guilty to one count of importing marijuana in violation of 21 U.S.C. §§ 952 and 960 and 18 U.S.C. § 2 pursuant to a conditional plea agreement that preserved his right to appeal the court’s denial of (1) his motion to suppress; and (2) his motions related to Apprendi. On May 5, 2002, the district court sentenced Hernandez to one month imprisonment, and three months residence in a halfway house during the beginning of his three year term of supervised release. This appeal follows.
II
“The task of guarding our country’s border is one laden with immense responsibility.” 1 United States v. Bravo, 295 F.3d 1002, 1005 (9th Cir.2002). Border agents serve as our first line of defense in preventing people intent on violating our laws from coming into our country. But in doing so, these border agents have a related duty to protect the basic rights of individuals who legally cross into our country. To effectuate the dual goals required of our border agents, we have allowed border agents to search both persons and objects that arrive at our borders “without any articulable level of suspicion, so long as the search is routine.” See United States v. Okafor, 285 F.3d 842, 845 (9th Cir.2002). But we have maintained the requirement that police, and here border agents, need probable cause to make a warrantless arrest of an individual. See United States v. Del Vizo, 918 F.2d 821, 825(9th Cir.1990). Whether border agents have probable cause to arrest an individual is a mixed question of law and fact. United States v. Buckner, 179 F.3d 834, 837 (9th Cir.1999). Probable cause exists if, under the totality of the circumstances known to the arresting officers, a prudent person would have concluded that there was a fair probability that the individual had committed a crime. Beck v. Ohio, 379 U.S. 89, 91, 85 S.Ct. 223, 13 L.Ed.2d 142 (1964); Bailey v. Newland, 263 F.3d 1022, 1031 (9th Cir.2001). We conclude that border agents had probable cause to arrest Hernandez.2
Hernandez argues that his “mere presence” as a rear seat passenger in a van carrying drugs across the border is not enough to establish probable cause to arrest him. At issue here is not whether Hernandez’s mere presence in the minivan supported his arrest but whether his presence, his relationship to others in the vehicle, his behavior at the border and his proximity to a large amount of illegal drugs in the minivan gave officers sufficient probable cause to arrest him.
We begin by determining the point at which Hernandez was arrested. The standard for determining whether a person is under arrest is not simply whether a person believes that he is free to leave, see United States v. Mendenhall, 446 U.S. 544, 554, 100 S.Ct. 1870, 64 L.Ed.2d 497 (1980), but rather whether a reasonable person *434would believe that he or she is being subjected to more than “temporary detention occasioned by border-crossing formalities.” United States v. Butler, 249 F.3d 1094, 1100(9th Cir.2001).
Hernandez claims that he was arrested when the officers placed handcuffs on him and escorted him to the secondary security office. The government argues that Hernandez was arrested not when the officers temporarily placed handcuffs on Hernandez to escort him to the security office but instead when handcuffs were placed on Hernandez in the security office following the positive identification of marijuana in the minivan.
In Bravo, we held that the defendant was not under arrest while border agents searched his car even though Bravo was temporarily handcuffed while he was escorted to a secondary office and then uncuffed and allowed to sit on a bench while his vehicle was being searched. 295 F.3d at 1011. These facts parallel the situation here. Hernandez was removed from the minivan, temporarily placed in handcuffs while he was taken to a secondary office, and then left uncuffed in the secondary office until it was confirmed that the packages in the door of the minivan contained marijuana. We hold, under Bravo, that Hernandez was arrested by border agents in the security office after the agents positively identified the marijuana in the minivan, not while Hernandez was temporarily handcuffed by border agents while being escorted from his uncle’s minivan to the security office.
Turning to whether probable cause existed to arrest Hernandez, we examine the situation the border officers were presented with at the time of Hernandez’s arrest. Hernandez was sitting in the rear seat of a Ford Windstar minivan — a vehicle known by officers to be commonly used for drug trafficking. The questioning officer learned that Hernandez was not a mere casual hitchhiker, but was a relative of the driver and front-seat passenger. The officers removed a portion of the door of the minivan and discovered clear bags that appeared to contain commercial quantities of illegal drugs. When the customs inspector interviewed the driver of the minivan, Hernandez acted suspiciously, seemed very nervous and stiff and tried to avoid eye contact with the inspector. The border agents also saw that the purported drugs were within arm’s reach of Hernandez. The purported drugs were confirmed to be marijuana, in a sizable amount beyond that for individual use.3
Applying United States v. Heiden, 508 F.2d 898, 901-902 (9th Cir.1974), we hold that Hernandez’s presence as a rear seat passenger in a vehicle containing commercial quantities of illegal drugs, together with his suspicious behavior, his relationship to the other occupants of the vehicle, and his proximity to those illegal drugs, gave border agents probable cause to arrest him. In Heiden, border agents stopped a car suspected of transporting illegal aliens. Id. at 900. The driver of the car was unable to produce a key to the trunk, and when asked to remove the back seat, the driver said he did not know how. Id. When the agent and the driver removed the seat, the agent smelled marijuana. Id. Upon further inspection, agents discovered 110 pounds of marijuana in the trunk. Id. Heiden and the driver were *435arrested, and the officers later discovered the missing trunk key in Heiden’s sock. Id. Heiden sought to suppress evidence of the missing key, claiming the officers lacked probable cause to arrest him. Id. Heiden held that border agents have probable cause to arrest a passenger in a motor vehicle when border agents have a reasonable belief that the passenger is involved in transporting a commercial quantity of illegal drugs.4 Id. Although Hernandez was not the sole passenger in the vehicle and was a rear-seat rather than front-seat passenger, we conclude under our reasoning in Heiden that border agents here had a reasonable belief that Hernandez was involved in the transportation of a commercial quantity of illegal drugs because of his presence in the rear seat of the minivan, his suspicious unresponsive behavior at the border, his relationship to the other occupants, and his proximity to the illegal drugs hidden in the minivan.
Hernandez argues that Heiden is no longer good law following the Supreme Court’s decision in Ybarra v. Illinois, 444 U.S. 85, 100 S.Ct. 338, 62 L.Ed.2d 238 (1979).5 In Ybarra, the Supreme Court ruled there was no probable cause to arrest a defendant whose only connection to criminal activity was that he was a patron of a public tavern where the police had probable cause to believe that a bartender at the tavern possessed heroin for sale.6 Id. at 91, 100 S.Ct. 338. Ybarra makes clear that the police do not have probable cause to arrest someone who is in the mere presence of a third party whom the police have independent probable cause to arrest. However, Ybarra does not apply to a passenger in a vehicle that contains a large quantity of illegal drugs. The mere presence of a patron in a public tavern is far different from a passenger’s presence in a car containing a large quantity of illegal drugs. A car, unlike a tavern, is not open to the public. The passenger in a car typically has a relationship with the driver, but a patron of a tavern does not so often have a relationship with the bartender. As the Supreme Court noted in Wyoming v. Houghton, 526 U.S. 295, 304-305, 119 S.Ct. 1297, 143 L.Ed.2d 408 (1999), “A car passenger — unlike the unwitting tavern patron in Ybarra — will often be engaged in a common enterprise with the driver, and have the same interest in concealing the fruits or the evidence of their wrongdoing.” Here, border agents had good rea*436sons to suspect that Hernandez was engaged in a common enterprise with his uncle — the driver of the minivan — because of Hernandez’s suspicious actions and his proximity to the concealed drugs in the minivan. We conclude that Hernandez’s non-fortuitous presence in the rear seat of the minivan laden with a commercial quantity of illegal drugs, in conjunction with his suspicious behavior and his proximity to the illegal drugs, gave the border agents probable cause to arrest Hernandez.
Ill
Next, we examine Hernandez’s contention that the district court incorrectly denied him an evidentiary hearing on the issues of his alleged nervousness and the point at which his arrest occurred. The government argues that Hernandez waived his right to appeal the district court’s denial of an evidentiary hearing on these issues in his plea agreement. In the alternative, the government argues that the district court, within the scope of its discretion, granted Hernandez an evidentiary hearing that elicited testimony on both the issue of his nervousness and the timing of his arrest.
A defendant may waive his right to appeal in whole or in part if he knowingly and voluntarily agrees to the waiver. See 18 U.S.C. § 3742(a)(1); United States v. Navarro-Botello, 912 F.2d 318, 321 (9th Cir.1990) (holding that waiver of right to appeal as part of negotiated plea agreement does not violate due process or public policy). Hernandez argues that he did not waive his right to appeal the scope of his evidentiary hearing in his plea agreement with the government.
We construe the scope and validity of provisions in a plea agreement by determining whether the defendant reasonably understood the terms of the plea agreement when he pleaded guilty. United States v. De la Fuente, 8 F.3d 1333, 1337 (9th Cir.1993). As with other contracts, provisions of plea agreements may be ambiguous. It makes sense to construe ambiguities in a plea agreement in favor of the defendant because of the government’s superior bargaining power. Id. at 1338. Construing any ambiguities in the plea agreement7 in favor of Hernandez, we find that Hernandez is precluded from appealing the district court’s denial of certain issues in his evidentiary hearing. Hernandez’s conditional plea agreement limits his challenge, on appeal, of the district court’s denial of a motion to suppress his arrest to a legal challenge of the continuing validity of United States v. Heiden, 508 F.2d 898(9th Cir.1974) in light of Ybarra v. Illinois, 444 U.S. 85, 100 S.Ct. 338, 62 L.Ed.2d 238 (1979).
Hernandez argues that ambiguities in his plea agreement, construed in his favor, preserve his right to appeal the scope of his evidentiary hearing. We disagree. The language in the conditional plea agreement is clear: It emphasizes the motion to suppress, and it focuses on the “mere presence” doctrine of Ybarra. The agreement did not make reference to Hernandez’s right to appeal the scope of his evidentiary hearing before the district court.
*437Even if Hernandez could appeal the scope of his evidentiary hearing, Hernandez would not prevail, because the district court, within its discretion, granted Hernandez an ample evidentiary hearing that elicited evidence about his nervousness and his arrest.8 The government asked Inspector Smura on direct examination about the nervousness of the occupants of the minivan and Smura’s testimony pointed to many facts relating to Hernandez’s arrest, including his conversation with the driver of the minivan, the drug dog alert on the minivan and Smura’s prior knowledge of drug smuggling vehicles. Smura was open to cross-examination on these matters. We conclude that Hernandez waived his right to appeal the scope of his evidentiary hearing and that, even if he had not waived that right, the district court did not abuse its discretion when it granted Hernandez a limited evidentiary hearing.
IV
We turn to Hernandez’s challenge that the drug statutes in 21 U.S.C; §§ 841 and 960 violate the Fifth and Sixth Amendments by taking from the jury, and giving to the trial judge, fact determinations — the type and quantity of drug — that determine the maximum penalties for such violations. Although we squarely rejected this argument in United States v. Buckland, 289 F.3d 558, 562 (9th Cir.2002) (en banc) (holding 21 U.S.C. § 841 constitutional) and United States v. Mendoza-Paz, 286 F.3d 1104, 1109-10 (9th Cir.2002) (holding 21 U.S.C. § 960 constitutional), Hernandez now claims that Harris v. United States, 536 U.S. 545, 122 S.Ct. 2406, 153 L.Ed.2d 524 (2002), requires us to hold that Buckland and Mendoza-Paz were wrongly analyzed and that the Supreme Court has overruled these precedents. We reject this argument and hold that Buckland and Mendoza-Paz have continuing validity in light of Harris, which did not overrule nor undermine them.9
Appellant’s first argument, that Harris overrules Buckland and Mendozo-Paz, is based on our reasoning in Buckland indicating that the difference in labels between “sentencing factors” and “elements of a crime” was not important. Applying Apprendi v. New Jersey, 530 U.S. 466, 120 S.Ct. 2348, 147 L.Ed.2d 435 (2000), we asked in Buckland: “does the required finding expose the defendant to a greater punishment than that authorized by the jury’s guilty verdict?” Buckland, 289 F.3d at 566 (quoting Apprendi, 530 U.S. at 494, 120 S.Ct. 2348).
Hernandez contends that Buckland’s minimizing the distinction between “ele*438ments of the offense” and “sentencing factors” lacks validity in light of the Supreme Court’s decision in Harris v. United States, — U.S. -, 122 S.Ct. 2406, 153 L.Ed.2d 524 (2002). We disagree. Harris is consistent with Buckland and holds that “ ‘[o]ther than the fact of a prior conviction, any fact that increases the penalty for a crime beyond the prescribed statutory maximum,’ whether the statute calls it an element or a sentencing factor, ‘must be submitted to a jury, and proved beyond a reasonable doubt.’ ” Id. at 2410. (quoting Apprendi 530 U.S. at 490, 120 S.Ct. 2348) (emphasis added). It is the “effect” of the fact that is important. Apprendi, 530 U.S. at 494, 120 S.Ct. 2348; Buckland, 289 F.3d at 566; Mendoza-Paz, 286 F.3d at 1110.
Hernandez’s second argument that Harris trumps Buckland is based on the contention that Hams rejected Buckland’s use of the “canon of constitutional avoidance.” Harris did no such thing. The Supreme Court in Harris did not employ the canon of constitutional avoidance because that canon “applies only when there are serious concerns about the statute’s constitutionality,” and the Court found that there were not serious concerns about the statute at issue there, 21 U.S.C'. § 924(c)(1)(A). Harris, 122 S.Ct. at 2413. Although Hams did not involve a serious challenge to the constitutionality of a statute, Buckland did. It was proper for us to use the canon of constitutional avoidance in Buckland. And Harris does not by its terms supplant the fundamental canon of constitutional avoidance: Courts can and should continue to adopt statutory interpretations, when feasible, that will avoid serious constitutional issues. Avoiding such issues, which are considered only when necessary, is a measure of restraint by the Judiciary and a measure of respect for Congress as a coordinate branch.
In Buckland, the court observed that it was unclear from the language of § 841 whether Congress intended drug type and quantity to be determined by the judge or the jury, and under what burden of proof. Buckland, 289 F.3d at 567. Because construing § 841 as requiring the sentencing judge to determine drug type and amount posed serious constitutional problems, and because a constitutional reading of § 841 was “fairly possible,” in Buckland we properly used the avoidance doctrine to conclude that Congress must have intended the jury to determine drug type and quantity beyond a reasonable doubt. Id. Harris does not hold or indicate that was error.
Rejecting appellants’ arguments in full, we now hold that there is nothing in Harris contradicting or overruling Buckland’s decision sustaining the constitutionality of 21 U.S.C. § 841 and Mendoza-Paz’s decision sustaining the constitutionality of 21 U.S.C. § 960.
V
Finally, Hernandez argues that the reasoning behind our decisions in Buckland and Mendoza-Paz require the government to prove that Hernandez had the requisite mens rea with respect to both the type and quantity of drug he possessed and imported. This challenge is foreclosed by United States v. Carranza, 289 F.3d 634, 644 (9th Cir.2002) (“A defendant charged with importing or possessing a drug is not required to know the type and amount of the drug.”).
AFFIRMED.