People may think they are avoiding calories when they opt for diet soda, but a new study claims that those who commonly choose diet drinks often compensate for the low calorie content by eating more unhealthy food.

In the new study, a University of Illinois researcher looked at the dietary habits of more than 22,000 U.S. adults over a 10-year period. Kinesiology and community health professor Ruopeng An looked at the subjects’ daily calorie intake as well as their consumption of “discretionary foods”—foods that do not belong to any major food group and are usually low in nutrients and high in sugar, sodium, fats, and cholesterol (think cookies and french fries).

The study also focused on the individuals’ consumption of five different types of drinks: diet or sugar-free drinks, sugar-sweetened beverages, coffee, tea and alcohol. Over 90% of people in the study ate discretionary foods every day. While people who drank diet beverages and coffee consumed fewer calories every day than drinkers of alcohol and sugary beverages, they ate a higher proportion of their daily calories from discretionary foods.

“It may be that people who consume diet beverages feel justified in eating more, so they reach for a muffin or a bag of chips,” An said in a statement. “Or perhaps, in order to feel satisfied, they feel compelled to eat more of these high-calorie foods.”

The study suggests switching to diet drinks in an effort to lose weight may not be a good strategy. More research is needed to determine precisely why people who opt for diet drinks consume more unhealthy food, but An says people should pay attention to both what they eat and what they drink.

The study is published in the Journal of the Academy of Nutrition and Dietetics.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.