(Reuters) - Coca-Cola Co KO.N said on Tuesday it would take a hit in the second quarter from the introduction of a British sugar tax on soft drinks and rising freight costs in the United States, overshadowing modestly better than forecast results for the first three months of 2018.

The somber forecast undid an initial rise in shares of the world’s biggest drinks maker after it topped forecasts for revenue and profit, helped by a reboot of its Diet Coke brand that has introduced new flavors and cans.

The company said it had reformulated recipes and launched smaller packaging to ensure that two-thirds of its major brands would not be subject to the new tax, but Coca-Cola Classic, its top-selling U.K. brand, will still face the levy, which kicked in on April 6.

Company executives during a post-earnings call also cautioned that rising freight costs in North America, up 20 percent from a year earlier, would reduce revenue in the first half of the year.

“People assumed that Coke sold to bottlers, and so some didn’t realize how much exposure the company has on freight,” said Brittany Weissman, a consumer analyst with Edward Jones. “But they do distribute and are affected.”

U.S. packaged goods companies, already struggling with lower demand and price tensions with retailers, have recently begun flagging higher commodities and transportation costs.

A jump in volumes due to the timing of Easter holiday shipments and price cuts in North America helped Coca-Cola top first-quarter revenue estimate by $300 million.

Total volumes rose 3 percent in the first quarter, with growth in both sodas and teas and coffees driving much of the gains.

Organic sales, which exclude gains from acquisitions or divestitures, rose 5 percent in the quarter.

“While it’s good to see the underlying volumes improve, people are concerned on the pricing side, if those volumes are gaining at the expense of the price and mix,” said Weissman.

First quarter net revenue fell 16 percent to $7.63 billion, due to the divestment of its bottling operations, but beat analysts’ estimates of $7.34 billion.

Despite the strong results, Coca-Cola retained its full-year outlook for organic sales growth and earnings per share, which could also have disappointed investors, brokerage Macquarie said.

Excluding items, net profit of 47 cents per share beat consensus forecasts by 1 cent, the company said.