
552 F.3d 739 (2009)
UNITED STATES of America, Appellee,
v.
Tommy ROLLINS, Jr., Appellant.
No. 08-2076.
United States Court of Appeals, Eighth Circuit.
Submitted: December 9, 2008.
Filed: January 21, 2009.
*740 Ronald E. Partee, Fox Partee & Nigro, LLC, Kansas City, MO, for appellant.
Rudolph R. Rhodes, IV, Asst. U.S. Atty., Kansas City, MO (John F. Wood, U.S. Atty., on the brief), for appellee.
*741 Before MELLOY and BENTON, Circuit Judges, and DOTY,[1] District Judge.
BENTON, Circuit Judge.
Tommy Ray Rollins, Jr., pled guilty to possession of unregistered destructive devices, 26 U.S.C. §§ 5841, 5861(d), and 5871. He appeals the denial of a motion to withdraw his guilty plea and sentence. Having jurisdiction under 28 U.S.C. § 1291, this court affirms.

I.
Rollins shot a Missouri highway patrolman and stashed two molotov cocktails near the house of intended victims. Federal and state prosecutors brought separate cases against Rollins. He pled guilty to the single federal charge, unregistered molotov cocktails, without a plea agreement. Rollins later moved pro se to withdraw his guilty plea. The district court[2] denied the motion, as well as a subsequent motion filed by counsel. A state court jury convicted Rollins in March 2008.
The district court imposed the federal sentence on May 1, 2008. With a Guidelines range of 135 to 168 months, the court imposed a 120-month sentence, the statutory maximum. The court ordered the federal sentence to be served consecutively to any yet-to-be-imposed state sentence. The state court imposed sentence on May 30: two concurrent life sentences, followed by concurrent 15- and 7-year sentences.

II.
"A guilty plea may be withdrawn before sentencing if the defendant demonstrates a `fair and just reason' for the withdrawal." United States v. Mugan, 441 F.3d 622, 630 (8th Cir.2006), quoting Fed. R.Crim.P. 11(d)(2)(B). "The defendant bears the burden of showing fair and just grounds for withdrawal." Id. at 630-31. This court reviews the denial of a motion to withdraw a guilty plea for abuse of discretion. United States v. Maxwell, 498 F.3d 799, 801 (8th Cir.2007).
Rollins asserts that he was incompetent when he pled guilty, citing (1) a diagnosis for Major Depressive Disorder and Paranoid Personality Disorder, and (2) consumption of prescription medication. At the change-of-plea hearing, Rollins stated that he was not under the influence of any substance and that he understood the proceedings.
Q: Are you mentally under the influence, that is, is your mind affected by drugs, medicine, pills, alcohol, anything you have had to eat or drink the past 48 hours?
A: No.
Q: Have you understood the proceedings so far?
A: Yes.
Rollins's counsel stated at the hearing that Rollins was competent, and Rollins does not allege any error in the Rule 11 colloquy. Rejecting the motion to withdraw the plea, the district court noted that Rollins's pro se motion demonstrated "a considerably better than average understanding of the legal issues."
The district court did not abuse its discretion by rejecting the motion. Rollins's diagnosis does not, by itself, render his plea invalid. Demonstrating competence, Rollins was responsive and engaged during the Rule 11 colloquy. Even if suffering *742 from a disease, a defendant's plea is valid if the record demonstrates that he "understood the charges against him, was not dissatisfied with the services rendered by his attorney, and entered his plea knowingly and voluntarily." United States v. McNeely, 20 F.3d 886, 888 (8th Cir.1994) (per curiam).
Likewise, the consumption of prescription medication is irrelevant, as Rollins told the court during the plea that he was not under the influence of any mind-altering substances. This situation differs from the cases cited by Rollins, where courts failed to explore competency during Rule 11 proceedings after a defendant then told the court of recent drug ingestion. See United States v. Parra-Ibanez, 936 F.2d 588, 595-96 (1st Cir.1991); United States v. Cole, 813 F.2d 43, 47 (3d Cir.1987).
Rollins also appeals the sentence. He contends that the district court erred by imposing a sentence consecutive to a yet-to-be-imposed state sentence, and that he should receive credit for time served as a state pretrial detainee. This court reviews the district court's interpretation of the Sentencing Guidelines de novo, and its application of the Guidelines to the facts for clear error. United States v. Pando, 545 F.3d 682, 683 (8th Cir.2008). This court reviews a district court's decision to impose a concurrent or consecutive sentence for reasonableness. United States v. Winston, 456 F.3d 861, 867 (8th Cir.2006).
Rollins asserts that the district court erred by not applying United States Sentencing Guideline § 5G1.3(b) when sentencing him. That section applies if "a term of imprisonment resulted from another offense that is relevant conduct" under U.S.S.G. § 1B1.3(a)(1)-(3). U.S.S.G. § 5G1.3(b). If applicable, § 5G1.3(b) directs that "the sentence for the instant offense shall be imposed to run concurrently to the remainder of the undischarged term of imprisonment." Id. § 5G1.3(b)(2).
Section 5G1.3(b) does not apply here. The district court sentenced Rollins before the state court sentenced him. At the time of federal sentencing, Rollins was not subject to a "term of imprisonment." See 8 U.S.C. § 1101(a)(48)(B) (defining "term of imprisonment" as "the period of incarceration or confinement ordered by a court of law"). Thus, the district court had discretion to impose "a federal sentence to be served consecutively to a yet-to-be-imposed state sentence." United States v. Mayotte, 249 F.3d 797, 799 (8th Cir.2001) (per curiam).[3]
"In exercising its discretion, the district court must, pursuant to [18 U.S.C.] section 3584(b), consider the factors set forth in 18 U.S.C. § 3553(a)." Id. Here, the district court considered the § 3553(a) factors when imposing a consecutive sentence.[4]*743 Noting that the Guidelines recommend a sentence of 135 to 168 months, the court stated that it could have ordered the same 120-month consecutive sentence by finding that Rollins's criminal history did not adequately reflect his past criminal conduct and dangerousness to the public. See 18 U.S.C. § 3553(a)(1), (a)(2)(C). Since the district court considered the § 3553(a) factors and committed no significant procedural error, and Rollins does not challenge the substantive reasonableness of the sentence, this court affirms the sentence.
Finally, Rollins seeks credit for the 36 months he spent as a pretrial detainee in state custody, citing U.S.S.G. § 5G1.3. For the reasons stated, § 5G1.3 does not apply here.

III.
The district court's judgment is affirmed.
NOTES
[1]  The Honorable David S. Doty, United States District Court for the District of Minnesota, sitting by designation.
[2]  The Honorable Howard F. Sachs, United States District Court for the Western District of Missouri.
[3]  The Mayotte opinion says that four circuits agree with this rule, and three disagree. While three circuits still agree, five circuits now disagree with this court. See United States v. Donoso, 521 F.3d 144, 147-49 (2d Cir.2008) (per curiam) (disagree); United States v. Smith, 472 F.3d 222, 226 (4th Cir. 2006) (disagree, but applying its rule to a yet-to-be-imposed federal sentence); Romandine v. United States, 206 F.3d 731, 738-39 (7th Cir.2000) (disagree); United States v. Quintero, 157 F.3d 1038, 1039-41 (6th Cir.1998) (disagree); United States v. Williams, 46 F.3d 57, 58-59 (10th Cir.1995) (agree); United States v. Ballard, 6 F.3d 1502, 1510 (11th Cir. 1993) (agree); United States v. Brown, 920 F.2d 1212, 1217 (5th Cir.1991) (agree), abrogated on other grounds by United States v. Candia, 454 F.3d 468, 472-73 (5th Cir.2006) (noting changed standard of review); United States v. Eastman, 758 F.2d 1315, 1317-18 (9th Cir. 1985) (disagree).
[4]  The district court cited U.S.S.G. § 5G1.3(c) when applying the § 3553(a) factors. Section 5G1.3(c) applies when the defendant is subject to an "undischarged term of imprisonment." Since § 5G1.3(c) directs the district court to apply the § 3553(a) factors when determining whether to apply a concurrent or consecutive sentence, any error in applying U.S.S.G. § 5G1.3(c) is harmless.
