Not only do women make less money than men, but it turns out they get charged more than their male counterparts when it comes to buying a home.

That’s a according to a new study from the Urban Institute, which found that banks often change single women significantly higher interest rates when they borrow money to purchase a home than single men. And that’s true despite the fact that women tend to default on their loans less than men.

Women do, on average, make less money than men and have worse credit scores. But the researchers said that didn’t explain away the extra interest women are charged.

“Looking at loan performance for the first time by gender, however, we find that these weaker credit profiles do not translate neatly into weaker performance,” the report reads. “In fact, when credit characteristics are held constant, women actually perform better than men. Nonetheless, since pricing is tied to credit characteristics not performance, women actually pay more relative to their actual risk than do men.”

Women are also more likely to be denied a mortgage than men. And this is not only a gender issue, but one of class and race as well. That’s because more than one-third of single, female borrowers are minorities and almost half live in low-income communities.

“We need to develop more robust and accurate measures of risk to ensure that we aren’t denying mortgages to women who are fully able to make good on their payments,” the report argues.

Banks cannot use sex as a determinant of the sort of mortgages they offer, because that would be in violation of the Equal Credit Opportunity Act, which prohibits credit discrimination on the basis of race, color, religion, national origin, sex, marital status, age, or because you get public assistance.

These laws are meant to protect disadvantaged groups like women and minorities, but in this case it appears that it is actually hurting women, who would likely be getting a better deal from banks absent the law.

The Urban Institute argues that as a result “we need to develop more robust and accurate measures of risk to ensure that we aren’t denying mortgages to women who are fully able to make good on their payments.” Unfortunately, it doesn’t say what these measures could be, which means that women may just need to get used to paying more for mortgages.