It’s a fact: women are inadequately represented in the working worlds of technology, math and science. There are a number of known factors contributing to this disparity. We’re aware that there’s hiring discrimination in these fields. But we also know that one of the biggest problems is that many girls simply aren’t choosing these lines of work. As the New York Times reports, when it comes to Advanced Placement exams in computer science, only 12 percent of test-takers were girls.

Now, a new study has further exposed an element influencing these results: some elementary school teachers may have a biased belief that leads them to expect girl are worse at math than boys—and they tend to grade accordingly.

The study, published by the National Bureau of Economic Research, followed three groups of Israeli students from sixth grade through the end of high school. They were given two exams that were each graded by different instructors—some that knew their identities, and some that did not. As the Times explains:

In math, the girls outscored the boys in the exam graded anonymously, but the boys outscored the girls when graded by teachers who knew their names. The effect was not the same for tests on other subjects, like English and Hebrew. The researchers concluded that in math and science, the teachers overestimated the boys’ abilities and underestimated the girls’, and that this had long-term effects on students’ attitudes toward the subjects.

By the time junior high and high school rolled around, boys from this study, encouraged through higher test scores, did significantly better on national exams than their female classmates. The economists leading the study said that they expect the results are applicable in the United States.

What this goes to show is that teachers may be unknowingly deterring girls from feeling confident in their math and science abilities, thereby undercutting their future success in these fields. “It goes a long way to showing it’s not the students or the home, but the classroom teacher’s behavior that explains part of the differences over time between boys and girls,” one of the paper’s co-authors told the Times.

It also suggests that our assumptions about a kid’s “innate” skills may have a big influence on their future achievements. Amanda Marcotte over at Slate points out that the findings are in line with an oft-proven dynamic called the Pygmalion effect, which shows that “Just by believing that a student has an aptitude for something, the teacher makes it more likely to be true.”

But don’t go blaming gender divergences on bigoted teachers. In fact, all of the instructors were themselves women, and researchers note that their bias is very likely unconscious and unintentional. What this means, though, is that solving these problems is going to be complicated, because the factors causing it are so deeply rooted.

For now, though, it’s a safe bet to say that actively encouraging the girls in your life, and strengthening their awareness of their math and science skills, may just help to ensure that the next generation will further prove that smarts in particular fields aren’t gender-exclusive.