Costco Wholesale (COST) beat the Street on Tuesday by logging a 39% rise in fiscal second-quarter profits amid rising membership fee revenue and a one-time tax benefit.

While Costco’s total revenue trailed forecasts, shares of the No. 1 U.S. warehouse club operator rallied over 1% in premarket action.

The company said it earned $547 million, or $1.24 a share, last quarter, compared with a profit of $394 million, or 90 cents a share, a year earlier.

Excluding one-time items like a $62 million tax benefit, Costco earned $1.10 a share, topping the Street’s view of $1.06.

Revenue rose 8.3% to $24.87 billion, narrowly missing consensus calls for $25.03 billion.

Costco said its U.S. same-store sales increased 5% last quarter, while international sales jumped 6%.

At the same time, revenue from membership fees climbed 15% to $528 million.

After picking up almost 4% so far this year, shares of Costco gained 1.43% to $103.91 ahead of   Tuesday’s opening bell.

Follow Matt Egan on Twitter @MattMEgan5