Most men who take prescription medications know that they’re going to come with a list of side effects, which usually include drowsiness, headaches, dry mouth, or upset stomach. Sometimes, they’re a bit more serious, encompassing everything from skin irritation to allergic reactions and anaphylactic shock. But most of these guys forget one of the more unwanted side effects: erectile dysfunction.

Around the country, erectile dysfunction, or simply ED, affects as many as 30 million men, according to the Department of Health and Human Services. Though this figure probably doesn’t include all those men taking prescription meds, they certainly experience the same effects, such as anxiety, depression, low self-esteem, and a decreased quality of life. Neverthless, it’s important to know which medications may cause these side effects, and speak to a doctor about possible alternatives — or just prepare to have trouble keeping it up. Here are five of them.

Benzodiazepines

It’s interesting that benzodiazepines, which are commonly used for anxiety — but also seizures and insomnia — can cause ED, and thus further anxiety. In fact, you’ll find that it’s a running theme. Anxiety is well known to cause ED, as increased levels of stress harm the body and take away from a man’s libido.

Though common benzodiazepines, such as Xanax, Ativan, Valium, and Librium, may help calm a man’s anxieties through sedative effects, they may also end up lowering a man’s desire to have sex, as well as his ability to stay erect.

Antidepressants

Another condition that causes ED in itself, major depression affected an estimated 16 million adults in 2012. Antidepressants are also used to treat anxiety disorders, obsessive compulsive disorder, and even long-term pain. One of the major forms of antidepressants, called selective serotonin reuptake inhibitors (SSRIs), are comprised of the drugs Celexa, Prozac, Zoloft, and Lexapro.

Up to 60 percent of people taking SSRIs may experience ED, according to Medscape. Though it’s unclear how it causes ED, experts suspect it relates to the way the drugs influence function of the neurotransmitters serotonin, norepinephrine, and dopamine, all of which relate to feelings of well-being.

Beta Blockers

High blood pressure damages blood vessels, including those in a man’s penis; causing ED. But beta blockers, one of the drugs most commonly prescribed to people who have blood pressure, may also cause them to experience ED. Drugs that fall into this category include Sectral, Lopressor, Cogard, and Tenormin.

Just like antidepressants, these drugs also affect neurotransmitters in the brain, specifically epinephrine (adrenaline). In this particular case, they counteract the stimulatory effects of the molecule, tamping down on a person’s excitement. At the same time, some evidence suggests beta blockers also messes with the areas of a man’s nervous system that make him erect.

Antihistamines

Millions of men suffer from allergies, but some of the most common drugs, such as Benadryl and Dramamine, may be causing them to have ED, too. Though it’s unclear exactly how it causes ED, personal accounts of its effects suggest that it could alter the way men’s nervous systems react to stimulation around the penis. It also seems to be temporary, with sensation coming back gradually after ending use.

H2 Blockers

Also called H2-receptor antagonists, this category of drugs include the popular heartburn drugs Zantac and Pepcid. They’re used to treat gastrointestinal disorders like gastric ulcers, erosive esophagitis, and gastroesophageal reflux disease.

For the most part, they cause ED when taken in high doses, and the drug Tagamet (cimetidine) is most likely to give men problems. Along with Ed and a decreased libido, they can also lower a man’s sperm count.

Though life on these drugs may seem grim within the sexual arena, taking them is important for treating whatever disease a doctor has prescribed them for. Also, by talking with a doctor about alternative treatments, lowering doses, or taking supplements, anyone who takes these drugs may be able to get some of their sexual health back.