Lowe’s strong profits in the second-quarter were overshadowed by a more guarded outlook as the home-improvement retailer rethinks what it’s putting on stores shelves.

Shares dropped more than 2 percent before the market opened Wednesday.

Lowe’s is preparing for a more constrained housing market and is closing the 99 Orchard Supply Hardware stores it owns in California, Florida and Oregon so that it can focus solely on its core home improvement business.

Higher mortgage rates combined with steadily rising real estate prices have dampened home sales this summer despite the robust economy and job market, but Americans continue to invest in the places where they live.

For the three months ended Aug. 3, Lowe’s earned $1.52 billion, or $1.86 per share, or $2.07 per share when one-time events are removed. That’s 5 cents better than what analysts surveyed by Zacks Investment Research predicted.

The Mooresville, North Carolina, company earned $1.42 billion, or $1.68 per share, a year earlier.

Revenue rose to $20.89 billion from $19.5 billion, topping the $20.81 billion that analysts polled by Zacks expected.

Sales at stores open at least a year, a key gauge of a retailer’s health, climbed 5.2 percent, and 5.3 percent when measuring only U.S. locations, which was in line with expectations.

Last week, rival Home Depot handily beat expectations during its fiscal second quarter, bouncing back from a slow start to the year when terrible weather cooled construction projects. But unlike Lowe’s, it boosted its full-year profit and revenue forecasts.

Wednesday was the first earnings report for Lowe’s under its new CEO Marvin Ellison, who was president of the northern and western divisions at The Home Depot Inc. for eight years. Ellison, one of only a few African-American CEOs at a Fortune 500 company, took over for the retiring Robert Niblock after spending less than four years as CEO of J.C. Penney.

Lowe’s has struggled to keep pace with rival Home Depot, even in a solid housing market, something it hopes to change with the arrival of Ellison.

A week after joining Lowe’s, Ellison eliminated a handful of high-ranking executive positions in a bid to make the company more nimble.

Lowe’s said Wednesday that it now expects 2018 earnings of between $4.50 and $4.60 per share, with revenue up about 4.5 percent. Its prior outlook was for earnings in a range of $5.40 to $5.50 per share, with revenue rising about 5 percent.

Analysts polled by FactSet expect earnings of $5.44 per share for the year.

© The Associated Press. All rights reserved.