(Reuters) - The S&P 500 fell a tiny bit on Wednesday, with Microsoft and other technology stocks making modest gains but not quite offsetting losses in energy shares after oil prices dropped more than 2 percent.

It was the index’s fourth straight negative session, the first such streak since March, underscoring investor uncertainty as U.S. Senate Republicans attempt to reconcile their version of a tax-cut bill with that of the House of Representatives.

“It’s hard to speculate on what the final bill is going to say,” said Sean O’Hara, director at Pacer Financial Inc.

The bill passed on Saturday by Republican senators included a last-minute change to retain the corporate alternative minimum tax, or AMT, which had initially been removed.

Including the AMT could negate parts of the bill seen as beneficial to tech companies and other corporations.

Shares of Microsoft MSFT.O, Facebook FB.O and Google-parent Alphabet GOOGL.O rose more than 1 percent as the technology sector recovered from a recent selloff.

Oil prices CLc1 hit two-year lows after a surprise rise in U.S. inventories of refined products suggested demand may be flagging. [O/R]

Traders work on the floor of the New York Stock Exchange (NYSE) in New York, U.S., December 6, 2017. REUTERS/Brendan McDermid

Schlumberger SLB.N, Exxon XOM.N and Chevron CVX.N fell between 0.6 percent and 2.17 percent.

“Energy has had a mini-surge over the past month or so, and so I think this inventory build is being viewed as an opportunity to take some profits,” said Mike Baele, managing director at U.S. Bank Private Client Wealth Management in Portland, Oregon.

The Dow Jones Industrial Average .DJI ended down 0.16 percent at 24,140.91 while the S&P 500 .SPX lost 0.01 percent to 2,629.27.

The Nasdaq Composite .IXIC added 0.21 percent to 6,776.38.

Fueled by strong earnings growth and optimism that President Donald Trump will cut corporate taxes, the S&P 500 has surged 17 percent in 2017.

The index is trading at 18.4 times expected earnings, the multiple’s highest level since 2002, according to Thomson Reuters Datastream. But many investors expect steep corporate tax cuts to boost earnings, thereby making stocks relatively less expensive.

During Wednesday's session, Home Depot HD.N slipped 1.12 percent after the home improvement retailer announced a $15 billion share repurchase plan.

H&R Block HRB.N surged 10.27 percent after the tax preparation service provider reported better-than-expected revenue.

Declining issues outnumbered advancing ones on the NYSE by a 1.36-to-1 ratio; on Nasdaq, a 1.89-to-1 ratio favored decliners.

About 6.3 billion shares changed hands on U.S. exchanges, just below the 6.6 billion daily average for the past 20 trading days, according to Thomson Reuters data.