US stocks inched up on Friday, returning to form after a sell-off earlier in the week triggered by tensions between the US and North Korea.
The Dow Jones rose 0.06% to 21,858.32.
The modest daily gains failed to overcome losses earlier in the week, sending all three major US indices down more than 1% from last Friday
Stocks have surged this year, with gains attributed to strong corporate earnings.
The S&P 500 is up 8% since January, the Dow is up almost 10% and the Nasdaq by more than 15%.
But high valuations have had some investors bracing for a correction.
Analysts said the war of words between Washington and Pyongyang provided impetus for this week's losses. Weak earnings from companies such as Macy's and Snap, also contributed.
On Friday, shares in JC Penney sank more than 16% after the retailer reported weaker than expected sales.
Second quarter sales at stores opened more than 12 months dropped 1.3%, the fifth quarter in a row they have fallen.
Its net loss for the quarter widened to $62m from $56m a year earlier.
Reaction to new inflation data was muted.
Prices rose by just 0.1% last month, below expectations, with the annual inflation rate up to 1.7% from 1.6%.
That's below the target of 2%, which could convince the Federal Reserve to move more cautiously when it comes to raising interest rates.