Retirement savers just crossed an important threshold.

For the first time, employers and employees contributed more than $10,000 on average to 401(k) accounts over the course of a year, according to a new report from Fidelity Investments. The milestone shows that both workers and their employers are contributing more to the savings vehicles.

Savings are growing as more people find work and feel better about the economy, says Jeanne Thompson, a vice president at Fidelity Investments. Workers who received raises would have saved more in their accounts, even if they didn’t bump up their contribution rates. And, some people may have gained access to retirement accounts after starting a new job.

Still, that boost in confidence is also contributing to a more troubling trend: 401(k) loans are getting bigger, too.  The average loan was $9,720 at the end of June, up from $9,500 at the same time in 2014.

Now that the market has recovered and 401(k) balances are up, some people may feel more tempted to dip into their nest eggs, Thompson says. But the move could create multiple setbacks for their savings, she says. People who borrow against their 401(k)s need to pay the money back within a set period of time, typically five or 10 years. So if workers pay back the loans, their savings will eventually be re-invested. But by pulling the money out of the market temporarily, savers could reduce their long-term return investment growth, Thompson says.

Another factor: Some people paying back their loans may feel like they can no longer afford to save as much as they have been. Payments are often automatically deducted from workers’ paychecks, leaving them with less disposable income. Indeed, within five years of taking out a 401(k) loan, 40 percent of borrowers reduce their savings rate, Fidelity found.

Lastly, some people who change jobs may face a nasty surprise if they change jobs because many employers require workers to pay the loans back in full after they leave the company. People who don’t have the cash on hand might decide not to pay the loans back, which would require them to pay income taxes and a 10 percent early withdrawal penalty on the savings.

So before tapping into their savings accounts with a loan, workers should pause to think about how much this might undo all of their hard work. “They really need to think about ‘Can I afford this?'” Thompson says. “‘Am I going to be in this job for a long time?'”

Read more from Get There and check Instagram for more financial tips: