From nausea to rashes to drowsiness, most medications can cause side effects. For some common prescriptions, that can mean screwing with your erection, your orgasm, and your sex drive.

Keep reading for a list of medications that may cause problems in bed—and what you can do to put an end to those side effects.

Blood Pressure Meds Can Cause Erectile Dysfunction
Some medications for high blood pressure—beta-blockers and diuretics—can cause ED, says Steven Lamm, M.D., the medical director of NYU Langone’s Preston Robert Tisch Center for Men’s Health.

Beta-blockers lower BP by interfering with your sympathetic nervous system, while diuretics help relax blood vessel walls. While that’s good news for your heart, it can also reduce blood flow to your penis, making it difficult to get hard.

But there are other drugs that lower blood pressure without harming your erection, says Dr. Lamm. Ask your doctor about ARBs, ACE inhibitors, or calcium channel blockers, he says.

Antidepressants Can Prevent You From Having Orgasms
A common class of antidepressants—selective serotonin reuptake inhibitors, which include Prozac, Paxil, Zoloft, and Lexapro—can kill the mood in bedroom. In fact, an Irish study review found that up to three quarters of people on these meds experience sexual dysfunction.

One of the most common complaints among men is delayed ejaculation, which means you have trouble reaching orgasm, says Tobias Köhler, M.D., a urologist at Southern Illinois University School of Medicine.

SSRIs manipulate the neurotransmitters in your brain, which can postpone your ejaculatory response, Dr. Köhler says. The drugs may also lower your testosterone, which can interfere with your ability to get off.

Other antidepressants seem to be safer for your orgasm.

The Irish review found that just 14 percent of patients taking bupropion (which goes by the brand names Wellbutrin and Zyban, among others) reported sexual dysfunction. In fact, patients on bupropion actually reported increases in libido and more intense orgasms. Talk to your doctor to see if it’s safe to make the switch.

Painkillers Can Make Your Testosterone Plummet
Opioids impair your brain’s chemicals that tell your testicles to produce testosterone, Dr. Lamm says. Low T can kill your libido and your erection.

“I’ve seen patients’ testosterone levels drop to the very lowest levels I’ve seen in my practice when they’re on prescription painkillers,” he says.

The possible side effects are across the board for all opioids, says Dr. Köhler.

If you need to take prescription painkillers, ask your doctor to check your testosterone levels first. You may need to take both the pain meds and testosterone to balance the two out.

Yes, pot is now considered a medication in 24 states. While the drug is credited with improving nausea and nerve pain, it may also cause problems in bed.

A survey published in the Journal of Sexual Medicine found that men who used marijuana daily were more likely to have both premature ejaculation and delayed ejaculation.

Scientists have yet to figure out why marijuana causes orgasm difficulties, says Dr. Köhler.

If you use marijuana medicinally and have these side effects, talk to your doctor. You may need to swap pot for other meds to treat your condition.

Sleeping Pills Can Cause Prolonged Erections
Trazodone is an antidepressant and sedative that’s often prescribed to help people fall asleep. But the pill is also known to cause priapism—an erection that lasts longer than four hours.

One 2015 study found that 10 out of 13 patients taking trazodone dropped out because of its side effects, including prolonged erections.

If you stay hard for that long, it means that blood is trapped in your penis. Without treatment, priapism can lead to severe pain, tissue damage, and even permanent ED. That’s why you need to go to the emergency room if your erection lasts longer than four hours.

Dr. Köhler, who sees a couple of patients a year due to trazodone-induced erections, says the marathon boners can be avoided by following trazodone’s dosage instructions to the letter.