A new study has found that, while guns are the leading cause of death for U.S. children and adolescents, parents who teach their children how to handle and shoot firearms are less likely to store them safely out of kids’ reach.

“Some parents may believe that modeling responsible firearm use negates the need for secure storage,” said Jennifer Paruk, the lead author of a new study about gun safety published in JAMA Pediatrics, and a postdoctoral researcher at the New Jersey Gun Violence Research Center at the Rutgers School of Public Health. “But storing firearms securely is a part of firearm safety.”

The study surveyed 870 parents across nine states about their gun ownership and habits. Researchers asked the parents about whether they teach any gun safety habits to their kids and where and how they store their firearms — and then analyzed the relationship between these behaviors.

“We know that if kids can access firearms inside the home, that increases the risk for child suicide and unintentional firearm deaths,” Paruk said. “Storing firearms securely – locked up, unloaded, and separate from ammunition – is associated with decreased risk of firearm injury and death for kids.”

The study showed that 17% of parents who owned guns reported storing at least one of them unlocked and loaded. In some states, it’s illegal to store a loaded gun where children can access it.

One of the truly shocking findings in the study was that parents who demonstrated to their kids how to safely handle firearms were twice as likely to store them unlocked and loaded in their homes. Parents who had their kids practice safe firearm handling under supervision were 2.29 times more likely to have an unsecure, loaded gun at home. Parents who taught their children how to shoot were 2.27 times more likely to store guns unsafely.

Experts recommend not only storing firearms in locked locations that kids can’t access, but only storing them unloaded, and storing ammunition in a separate, also locked location.

“Kids are really smart,” Paruk said. “We know that kids can get into things and that they observe us. Just because parents think it’s locked up, it might not be. A child might know where the key is kept. That’s why keeping it locked up, keeping it unloaded, and keeping the ammunition separate are all good practices for decreasing the risk of firearm suicide and child unintentional injuries.”

Researchers also emphasized that safe gun storage doesn’t just apply to parents, but to anyone that might have a child visit their home, including grandparents and other relatives. All gun owners have a responsibility to keep their firearms safely stored and out of kids’ reach, they said.