Yes, coffee is kind of magical—a slew of research links it to everything from a reduced risk of dementia to revving your metabolism. And then, of course, there's the essential energy boost it provides when we need it most (like, every single morning). 

So what's the catch? You may be unintentionally countering some of the brew's benefits depending on factors like when you drink it and what you add to it. But don't worry—we're here to help you clean up your coffee habit in the least painful ways possible. Check out these 8 common mistakes, and how to get the most nutritional bang from your beans. (Can’t sleep? You could be dealing with one of these 6 sleep problems that crop up after age 50.)

1. You buy it preground

Get your hands on some whole beans. Sure, they require a little extra effort since you have to grind them yourself, but research in the journal Food Chemistry shows that preground coffee contains more free radicals, which can contribute to oxidative stress and inflammation in the body.

2. You store coffee in its original bag

Store those beans in an airtight container—not in the bag. The same Food Chemistry study found that levels of free radicals in coffee increase with greater air exposure; and when that happens, more of coffee's health-promoting antioxidants are used up in order to neutralize them. This results in fewer antioxidants making it into your body. 

MORE: See What Happened When One Couple Only Ate Food From A Dumpster For 6 Months

3. You down a cup at the crack of dawn

Pounding a coffee at 7 a.m. isn't doing your energy levels any favors. That's because in the first couple hours after waking, your levels of the stress hormone cortisol are at their highest, which actually gives you a natural energy boost. So many experts agree that the best time to have your first cup is sometime between 10 a.m. and 12 a.m., when cortisol levels start to dip. That way, you'll be taking advantage of your body's natural high, and saving that hit of caffeine for when you really need it. 

4. You assume dark roast has more antioxidants

Here's one rule anyone can stick to: Drink the roast that you think tastes best, not the one you assume you should drink because it contains more antioxidants. Here's why: "Research on the optimal type of coffee for health is still at an early stage and it's unclear which roast is healthier," said Rob van Dam, PhD, adjunct associate professor of nutrition and epidemiology at Harvard T.H. Chan School of Public Health. (Speaking of antioxidants, check out these 6 fruits and veggies you should never peel.)

Per van Dam, both actually seem to be pretty good: Light roasts contain more of the phenolic compound chlorogenic acid, which has been shown to help stabilize blood sugar, possess antioxidant properties, and contribute to other health benefits. Dark roasts contain higher concentrations of compounds called melanoids, which have been associated with antioxidant, anti-cancer, anti-inflammatory, and anti-hypertensive properties.

5. You drink lighter roasts to consume less caffeine

Hate to break it to you, but that's the opposite of what you should be doing—lighter roasts actually contain more caffeine than dark roasts. The reason: The roasting process burns off caffeine, so the longer a coffee roasts, the less caffeine it will have. If you happen to be more sensitive to caffeine, or you're just looking for a less jitter-inducing brew, French roast can be a smart pick.

6. You drink way too much

More isn't always better; sometimes it's just more. In general, the health benefits associated with coffee tend to cap off at five to six 8-ounce cups—which works out to about 400 mg of caffeine, said Frances Largeman-Roth, RDN, a nutritionist and author of Eating in Color. (Check out this Your Body on Coffee infographic to see the health perks associated with various quantities of coffee.) Drinking more than that isn't doing you any favors, and for some individuals—like those who have difficulty controlling conditions like high blood pressure, diabetes, anxiety, or gastroesophageal reflux disease (GERD)—the cons of excess coffee could certainly outweigh the pros.

7. You turn your cuppa into candy

One of the coolest perks of coffee is that it's been shown to stabilize blood sugar levels and reduce the risk of type 2 diabetes, thanks in part to its antioxidants. But what about when you add sugar? According to van Dam, a little sweetness is probably okay, but turning your coffee into dessert is not: "The evidence is mixed—some studies suggest you can add a little sugar and still experience a reduced risk of diabetes, while others have only shown those benefits for unsweetened coffee drinkers. It's likely a matter of quantity." (We tried the coffee that had 40 times more caffeine than normal joe…here’s what happened.

As for milk or cream? You may be in the clear if these are your add-ins of choice.

"So far, there's no good evidence that black coffee is more strongly linked to health benefits like lower diabetes risk," van Dam said.

In fact, in one of his studies, half of the coffee drinkers added milk to their brew and half drank it black, but both groups experienced the same reduced risk of diabetes. 

8. It takes you FOR-EV-ER to finish a cup

Tell us if this sounds familiar: You brew a cup of coffee, take a few sips, set it down, forget where you put it, find it 2 hours later, reheat it, take a few sips, set it down…you get the idea. Well, all that time spent sitting around actually increases your coffee’s acidity. Not a huge health risk, but that extra acid may up your risk of heartburn and indigestion, and potentially contribute to greater erosion of tooth enamel. Coffee that sits out too long may also pack less of an antioxidant punch due to air exposure—some researchers suggest drinking coffee within 20 minutes of brewing for maximum antioxidant benefit.