While the decision to purchase a home can be a wise choice in planning for long-term financial stability, some first-time millennial homebuyers are running into trouble securing sustainable mortgages due to large amounts of student loan debt.

According to a new analysis by the financial news site MagnifyMoney, millennials carrying student loan debt face significantly higher obstacles to home ownership than those who don’t, and student loan debt even affects the value of a home from a mortgage.

“Millennials with student loan debt tend to have larger mortgages on lower-value homes. The home values of millennials younger than 35 with student loan debt are 5% lower than those without student loan debt,” the report reads. “The median value of homes for those with unpaid student loans was $157,000 in 2016, while millennial homeowners without student debt had homes with a median value of $165,000.”

Additionally, millennials with excessive amounts of student loans often have to take on higher amounts of debt to purchase a home, oftentimes because they simply aren’t able to put away enough money to make down payments. According to MagnifyMoney, the median mortgage of millennials with student loan debt is $104,000, versus on $98,000 for individuals of the same age without student loan debt.

With all of the associated troubles of student loan debt, it’s no wonder many millennials find it easy to flock toward candidates such as Sen. Bernie Sanders, I-Vt., who promise dreams of student loan forgiveness and a debt-free life. In addition to preventing students from adequate financial planning, such views can also cause students to take out further unnecessary amounts of debt, as they may feel such money may never need to be repaid once Bernie’s policies are implemented.

Regardless of the associated pains with owning a home, a well-negiotiated mortgage can still be a good investment toward long-term financial stability if done properly. Millennials should plan on contributing as much as possible to their monthly mortgage payments and student-loan debt payments, as paying off both early on can help individuals save more money for retirement.

John Patrick (@john_pat_rick) is a graduate of Canisius College and Georgia Southern University. He interned for Red Alert Politics during the summer of 2012 and has continued to contribute regularly.