All those scolded as children to keep their fingers out of their mouths have gotten the last laugh. A new study out of New Zealand has found that children who bite their nails and suck their thumbs are less likely to develop allergies later in life. While the news may be reassuring for those with such oral fixations, there are easier, and more aesthetically pleasing, ways to stay allergy free.

For the study, published online in the journal Pediatrics, researchers from the University of Otago followed the progress of 1,037 babies born in Dunedin, New Zealand in 1972 to 1973, from birth into adulthood. The data came from the Dunedin Study, originally created to investigate broader questions of child health and development. However, for the sake of their research, the team focused specifically on the parents’ reports of their children’s thumb-sucking and nail biting habits, and the possible health consequences of these behaviors.

Traditionally, nail biting and thumb sucking has been viewed as unhygienic, and for good reasons. There are countless nasty microbes that like to set up home right under our fingernails. For example, Buzzfeed reported that unpleasant bacteria such as Staphylococcus aureus, the germ responsible for skin infections, and E.coli, commonly found in feces, often live under our nails, and unfortunately also in the mouths of avid nail biters. Even worse, in some rare instances, nail biting can transfer the herpes virus from hand to mouth and cause uncomfortable oral sores.

Results of the study however showed some positive news — children who demonstrated these hand-to-mouth behaviors were less likely to test positive for allergies later in life. For example, at age 13, 38 percent of children who sucked their thumbs or bit their nails tested positive for a skin prick test to at least one common allergy, compared to 49 percent of children who did not. The children were tested again as adults at age 32 and still the same trend proved true — those who had sucked their thumbs or bit their nails during childhood were less likely to test positive for allergies. Those who both sucked their thumb and bit their nails were even less likely to test positive for a common allergy.

The researchers suggest that the reason for this link between thumb sucking/nail biting and decreased risk of allergies may be due to the “hygiene hypothesis,” which suggests that being exposed to microbes as a child reduces your risk of developing allergies, lead study author Dr. Bob Hancox explained in a recent statement. Still, despite the positive results, Hancox explained that he wasn’t recommending that parents encourage these behaviors, as the findings are still unclear. In addition, although thumb sucking and nail biting did appear to affect your overall allergy risk, the study found that it made no difference in your risk for developing allergy-related diseases, such as asthma and hay fever.

Still, there are other methods parents can employ to reduce their children’s allergy risk without having to resort to these notoriously frowned-upon habits. For example, working along the same premise of the “hygiene hypothesis,” studies have shown that having a childhood pet can also reduce lifetime allergy risks. In addition, growing up in a “microbe rich” environment, such as a dairy farm, can have a similar effect, and strengthen the immune system so that it can better tell apart dangerous foreign substances from their harmless counterparts.

Source: Lynch SJ, Malcolm RS, Hancox RJ. Thumb-Sucking, Nail Biting, and Atopic Sensitization, Asthma, and Hay Fever. Pediatrics. 2016.