Spending all of your workouts running on a treadmill instead of exercising in the great outdoors could place you at risk for a certain nutritional deficiency. That’s the conclusion of a study published recently in Nutrients.

Researchers tested vitamin D levels in 20 National Collegiate Athletic Association Division I men and women basketball athletes at George Mason University who typically exercised indoors. The scientists found that 13 (65%) of the players had poor vitamin D status at the beginning of the playing season (low levels were especially pronounced among African-Americans players). This deficiency not only places people at greater risk for bone fractures but also makes it harder to retain lean body mass.

A daily vitamin D supplement of 10,000 IU was enough to overcome insufficiency in most of the athletes by season’s end. Future research would be wise to test athletes involved in other indoor-centric sports like hockey or even people who glean most of their fitness at the gym. Beyond popping a pill, exercising outside more often and filling one’s diet with certain foods—like fatty fish, dairy and eggs—can boost vitamin D levels. If you’re concerned about a vitamin D deficiency, speak with your doctor about getting a blood test to determine whether supplementation is prudent.