Reaching your 50s can feel like a financial turning point. Your career might be at its peak, but retirement is starting to come into focus. At the same time, new demands, such as financially supporting adult children or caregiving for aging parents, may command your financial attention and eat into your ability to meet savings goals.

“There’s a well-known retirement red zone five years before and five years after retirement, where bad decisions can lead to long-term losses for a retiree,” says Steve Parrish, an attorney and professor at the American College of Financial Services in King of Prussia, Pennsylvania. “While there’s a lot going on during this period, prioritizing retirement planning is central to retirement success.”

Avoiding the following blunders can help keep your well-laid plans on track.

Prioritizing short-term expenses over growing your nest egg

It’s easy to let more immediate financial goals crowd out saving for retirement, especially when they involve helping loved ones, but that can have long‑term consequences. For example, diverting money you might sock away for retirement into a 529 plan for your child’s education could set you back significantly.

“You can borrow for an education, but you can’t borrow for retirement,” says Parrish. “People don’t always realize that.”

The fix: The solution is actually pretty simple: Create a budget, with saving for retirement as one of the essential line items, and don’t deviate.

Assuming your income will increase until you retire

Your position may feel secure, especially if you’ve been employed for a long time, but artificial intelligence is disrupting the labor market and putting many people’s jobs in jeopardy. In March, AI was the leading reason for job cuts by U.S.-based employers, according to a report from Challenger, Gray & Christmas, a global outplacement and executive coaching company.

“I’ve seen a lot of our clients in the 40-to-55 age range get laid off over the past two years,” says Emily Green, head of wealth management at Ellevest in New York City. Many older workers weren’t prepared, she says, with some people simply assuming “they were going to make ‘X plus inflation’ until they retire.”

The fix: Prepare for the worst by building up a solid emergency fund. Many financial planners recommend that working adults save enough to cover at least three to six months of essential living expenses.