That’s a question that engineering educators and recruiters have been asking themselves for years now.

Twenty percent of engineering graduates are women—but only 13 percent of the engineering workforce is female. It’s not a pipeline issue; engineering schools have been graduating women for a long time now. It’s been easy to blame women leaving the engineering workforce to balance the demands of family, but is that really it? Many have said there’s a culture problem, but what exactly does that mean?

It turns out, according to a recent study, that at least a big part of it happens when women are in mixed groups that need to divide chores. Typically, the division pushes the routine or boring work at the women, the challenging or interesting work at the men.

Researchers Caroll Serron at the University of California at Irvine, Susan S. Silbey at the Massachusetts Institute of Technology, Erin Cech (who performed the research at Rice University but is now at the University of Michigan), and Brian Rubineau at McGill University conducted the study to try to get a better idea of just why women who made it through years of STEM education start migrating out of tech. The effort, funded by the U.S. National Science Foundation, looked at 40 undergraduate engineering students, male and female, spread among the four schools. The students were asked to write in diaries twice a month, from freshman orientation through graduation, about anything of interest in their lives. The researchers also conducted interviews with 25 students at each school during years one and four.

In their paper, published in the May issue of the journal Work and Occupations, the researchers say the problem starts early—the first time engineering students are asked to work in teams. About the women, they write, “Their first encounter with collaboration is to be treated in gender-stereotypical ways.”

Ironically, the researchers noted, recent curriculum changes in engineering schools may be making the problem worse, not better.

“Many engineering programs have introduced a greater emphasis on design and team-based learning in the classroom, in essence mimicking and modeling the worksite, not only because it is arguably more creative and effective work practice but also because it is assumed that this will complement women’s social talents and enhance their opportunities for persistence in the field,” they wrote. “We find, however, that a gender differential in students’ professional role attachment tends to be produced in exactly those collaborative encounters in team-based design projects.”

Can this be fixed? The researchers suggest that engineering schools should consider “directed internship seminars” as one possible tool for ensuring that student internship experiences “are dissected to help people learn from the problems women face.”

In the meantime, is there anything women can do to fight the problem themselves? Valerie Coffman, chief technology officer at on-demand 3-D printing and prototyping firm Xometry, says there is. After considering the study results, Coffman told me that, while this kind of thing likely happens all over, she is indeed willing to believe it happens more often in tech. “In situations like this,” she suggests, “you need to be your own best advocate and aggressively seek out the most interesting and challenging projects. If your male peers try to task you with menial work, you can tell them ‘no’. They’re your peers, not your bosses.”