U.S. stocks recovered earlier gains as lower crude oil prices dragged energy companies shares down, while lifting airlines and bleak data showed a mixed picture of the housing sector.

Early afternoon, the Dow Jones Industrial Average was up 8.96 points at 12,488.59, the Nasdaq Composite Index gained 0.6 percent, or 14.59 points, at 2,459.26 and the S&P 500 was up 1.53 points to 1,377.46.

General Motors Corp., down 2.3 percent, and oil giants Exxon Mobil Corp. and Chevron Corp, both down more than 1%.

The Commerce Department reported sales of new homes climbed in April for first time in six months, but economists said the gain was a rebound from a sharp drop the prior month and doesn't mark a turning point for the embattled housing market

Also on Tuesday the Commerce Department reported that new-home sales rose in April, marking the first increase since October, although the gain came after a big downward revision to the prior month. In addition, sales were down 42 percent from a year ago.

Crude-oil futures were recently off $2.02 at $130.17 a barrel in New York. The dollar gained against the euro and yen.

Among technology companies Google Inc shares were up 2.1 percent to $556.13 and Apple Inc shares rose 1.4 percent to $183.70.

U.S. stocks markets were closed on Monday for the Memorial Day holiday.