Walmart on Thursday reported earnings that topped analysts’ expectations but sales came up short, as international revenues declined with currency headwinds dragging on its business overseas.

E-commerce sales grew 37%, boosted by its home and fashion businesses, Walmart said. That was better than online sales growth of 33% a year ago, but moderated from a 43% increase during the holiday quarter.

Its shares teetered in premarket trading and last were up about 2% on the news.

Here’s what Walmart reported compared with what analysts were expecting, based on Refinitiv data:

Walmart reported net income for the quarter ended April 30 of $3.84 billion, or $1.33 per share, compared with $2.13 billion, or 72 cents a share, a year ago. Excluding one-time charges, including unrealized gains and losses related to Walmart’s investment in JD.com, Walmart earned $1.13 a share, 11 cents ahead of analysts’ expectations, based on Refinitiv data.

Total revenues grew about 1% to $123.93 billion from $122.69 billion, falling short of expectations for $125.03 billion.

Net sales in the U.S. climbed 3.3%, while Sam’s Club sales were up 1.5%, but international sales tumbled 4.9%, Walmart said. On a constant currency basis, net sales overseas were up 1.2%.

Sales at Walmart stores in the U.S. open for at least 12 months were up 3.4%, the best growth of that metric during the first quarter in nine years, Walmart said. Analysts were calling for growth of 3.3%. Walmart said transactions were up 1.1%, and the average ticket increased 2.3% at its U.S. stores.

Sam’s Club same-store sales were up just 0.3%, hurt by lower tobacco sales, according to the retailer. In 2018, it made the decision to stop selling tobacco products at some locations. Analysts were calling for same-store sales growth of 1.6% for Walmart’s wholesale unit that rivals Costco.

Walmart has been pouring money into new technology that helps it more speedily fulfill online orders, grow its massive grocery business, stock shelves with merchandise and even train its own employees. Competing with Amazon online, Walmart just earlier this week announced it was starting to roll out next-day delivery across the country for more than 200,000 items, though it didn’t disclose exactly how much money it will be spending to do that. That was after Amazon on April 25 said it would be making free, one-day shipping a new perk for Prime members.

The biggest retailer in the world — headquartered in Bentonville, Arkansas — also has been on an acquisition spree to beef up its e-commerce business, buying companies ranging from Art.com to online lingerie retailer Bare Necessities. The company has said it’s targeting e-commerce sales growth of 35% for this year, which won’t be as robust as 2018.

Meantime, Walmart is still spending money on improving its supply chain, to make more of its stores capable of packing and delivering grocery orders placed via the internet. The company has said it’s on track to offer pickup for online grocery orders at 3,100 stores, and same-day grocery delivery from 1,600 locations, by the end of the year.

“Walmart’s early investments in tech/ecommerce and practice of continued price investment, which benefits from the company’s unmatched scale, have positioned it well for future share gains,” Jefferies said in a research note ahead of earnings.

One of the biggest threats hanging over Walmart for the remainder of the year could be the possibility of additional tariffs, impacting apparel and footwear specifically, going into effect. Macy’s CEO Jeff Gennette this week spoke to how a 25% tariff on another $300 billion worth of Chinese goods, which the White House is still considering, would likely trickle down and hurt shoppers.

Walmart shares are up about 18% from a year ago, bringing its market cap to roughly $286.4 billion. Amazon shares have rallied about 19% over that same time period, while Target’s stock is down 3% from a year ago.