Let’s forget all the diet trends, tips, hacks, advice—whatever you want to call it—for a moment. The formula for losing weight should be pretty simple: burn more calories than you consume. That means exercise should be an essential element in losing weight, right?

Right?

Well, as the New York Times reports and a study suggests, there’s a chance a regular exercise program could actually cause weight gain—and not from muscle, from actual fat. Yes, if you just quickly read the abstract of the study and the inflammatory media headlines (guilty as charged), exercise is apparently the latest culprit that’s making you fat.

Now wait a second. Before you storm over here with your dumbbells and TRX straps, let us explain how science could even reach this conclusion.

The study, published in the Journal of Strength and Conditioning Research, asked 81 overweight but healthy women to voluntarily partake in a 12-week aerobic exercise program. They were not asked to change their diet. Of course, you’d assume three months of regular treadmill sessions would melt off some fat. That was not the case for most of the women.

From the NYT:

“At the end of 12 weeks, the women were all significantly more aerobically fit than they had been at the start. But many were fatter. Almost 70% of the women had added at least some fat mass during the program, and several had gained as much as 10lbs, most of which was from fat, not added muscle.”

How is this even possible? Another study from 2013 in Medicine and Science in Sports and Exercise may have the answer.

It seems exercise might not be directly to blame. It’s the people actually doing the exercise, who gobble a whoopie pie after a gym session as a reward or decide it’s OK to then not move for the rest of the day. Put more scientifically from the study’s abstract, “some individuals adopt compensatory behaviors, that is, increased energy intake and/or reduced activity."

In other words, they pig out and bum around after getting home from the gym.

So no, exercise is not making you fat. It’s actually making you healthier and happier. But this research indicates that for weight loss, exercise is not the only magic bullet. No doubt it’s a very important factor, but so is the kitchen. This means you can't use your training as an excuse if you really want to lose weight. It doesn't compensate for poor eating.