American workers are keeping large chunks of their retirement savings in cash to protect themselves from another slump in the stock market.

Millennial workers have a third of their retirement funds in cash, more than any other asset class, according to a new retirement survey from investment manager Schroders. For workers 45 and older, that number is 29%.

Safety was cited by more than 60% of millennials and a full two-thirds of workers 45 and older, who said fear of losing money in the stock market was what kept them in cash. However, those who avoided equities missed out on the recent rally that saw the Nasdaq 100 enter a bull market last week and the S&P 500 post back-to-back quarterly gains.

“It was surprising to see how fearful millennials were in terms of being invested in the market,” said Joel Schiffman, head of strategic partnerships at Schroders. “Fear is not a retirement readiness strategy when you have a time horizon of decades.”

Sticking with a big slug of cash will make it harder for millennials accumulate the $1.3 million they said was needed to retire comfortably. That topped the $1.1 million average guesstimate of older workers.

But millennials aren’t feeling particularly optimistic about meeting that goal. Just under a third said they expect to reach the $1 million mark, and 27% said they might have less than $250,000 in savings when it comes time to retire. Among older workers, just 21% expected to have $1 million saved come retirement, down from 24% when the survey asked the same question last year.

The survey of 2,000 Americans was taken in mid-February to early March.

This article was provided by Bloomberg News.