J.M. Smucker Co.'s (SJM) - Get Report stock on Friday made some sweet gains after the foods producer beat second-quarter earnings estimates.

Smucker's shares climbed 3.6% to $107.85 after the maker of everything from Uncrustables and Jif peanut butter to dog and cat food reported GAAP profit of $1.85 a share versus $1.66 in the year-earlier quarter.

For the quarter ended Oct. 31, adjusted earnings were $2.26 a share, stronger than analysts expected and up 4% from $2.17 a year earlier.  

The gains followed a premarket downturn in the shares. Investors had been concerned that Smucker's executives had cut their guidance on earnings and sales for fiscal 2020.

Smucker's said it expected sales to fall 2% in fiscal 2020, compared to its previous estimate that sales would at least be even with the year earlier and could rise as much as 1%.

The company also cut its earnings guidance to a range of $8.10 to $8.30 a share, from its earlier projections of $8.35 to $8.55.

But the stock moved to the black after Smucker's executives assured investors that sales weakness was isolated to the company's premium dog food lines and was not a sign of a bigger problem.

Sales of Smucker's Uncrustables frozen grab-and-go sandwiches rose 19%. And while sales of the company's high-end coffee brands were flat, penetration into households rose, officials said.

Cash from operations jumped 10%, to $224 million, while free cash flow rose more than $35 million to $160.6 million.

"While our second-quarter sales performance did not meet our expectations, we delivered EPS growth ahead of our projection, reflecting our commitment to maintain financial discipline and strengthen our bottom line," said Mark Smucker, president and CEO, in a statement.