Your gut microbiome – the large community of microorganisms that make their home in your colon – can have all sorts of impacts on your body, both physical and mental. Many people take probiotic supplements to increase the amount of “friendly” or “good” bacteria in their guts. But there’s a catch – a new study has found that taking probiotic supplements can cause some pretty unpleasant side effects.

The new research – published in Clinical and Translational Gastroenterology – found that those who take probiotics can suffer side effects like stomach pains, bloating, gas, and even mental fogginess. This is all because the “good” bacteria expand their territory and colonize the small intestine and stomach, not just the colon.

Lead author Dr Satish Rao was inspired to carry out the research by a patient who, within just a minute of eating, would be affected by severe bloating and brain fogginess.

“It happened right in front of our eyes,” Rao said in a statement.

After conducting some tests, Rao found she had very high levels of D-lactic acid in her blood and urine, and that she regularly took probiotics and ate lots of yogurt.

D-lactic acid is temporarily toxic to the cells in our brains, and can affect our ability to think properly. How is it produced? Probiotic bacteria release it as a product of fermentation when they’re breaking down sugar in our guts.

In the latest study, Rao and his colleagues assessed 30 patients taking probiotics. It’s worth noting, however, that this is a pretty small sample size so more research is needed to back the findings up. The patients all suffered from gas and bloating, while 22 had cognitive issues like confusion and difficulty concentrating. Some had even had to leave their jobs as their brain fogginess, which could last for hours after eating, was so severe.

The team discovered that the patients had large communities of probiotic bacteria breeding in their small intestines, and therefore abnormally high levels of D-lactic acid. Normally, there isn’t much D-lactic acid in the small intestine, but probiotics change this.