As a fitness-minded individual, you probably stay away from things like candy for the most part. But we are all humans after all, and we have our weak points. That being said, a recent case out of Massachusetts is a good reminder that too much of a good thing can be bad, even deadly, for you.

Doctors recently reported on a case in The New England Journal of Medicine of an unnamed man who died after eating too much black licorice — yes, as in the candy. According to the doctors, he was eating “several packages” of licorice per day, which caused his heart to stop.

How could this be? Although you may think it had to do with the sugar in the candy, the culprit was actually a compound called glycyrrhizic acid, a compound that provides the primary sweet flavor in licorice root. Glycyrrhizic acid is also found in many supplements and even Belgian-style beers.

The problem with the compound is that it causes potassium levels in the body to plummet. Potassium, an electrolyte, is responsible for many bodily functions, including cardiac rhythm — or our heartbeat. When someone has depleted potassium levels, such as the licorice enthusiast, they’re susceptible to cardiac arrest.

It’s problem that’s been well-known for quite some time — the Food and Drug Administration issued a warning on excessive licorice consumption back in 2017. The experts noted that potassium levels return to normal once people stop eating licorice — but in the case of the Massachusetts man, he was eating it every day so the body did not have a chance to replenish to vital mineral.

Unlike many other minerals and compounds, it’s hard to tell how much glycyrrhizic acid is in a food. But for people over 40, or those with a history of heart conditions, it might be a good idea to stay away from the compound.