What happened

Shares of Rollins (ROL 3.27%) fell more than 10% on Wednesday after the pest-control specialist's second-quarter results were released. The company hit its targets, but investors were more focused on margins that came in weaker than many had expected.

So what

Rollins on Wednesday morning reported second-quarter adjusted earnings of $0.21 per share on revenue of $524 million, versus consensus expectations for $0.20 in EPS on revenue of $524 million.

An exterminator sprays the floorboards of a house.

Image source: Getty Images.

While last quarter, Rollins blamed the weather for sluggish growth, the focus this time around was on efforts to integrate its acquisition of California-based Clark Pest Control, the nation's eighth largest pest control company, and spending being done to modernize and expand its back-office platforms. Rollins is revamping its 401(k) and other benefit programs and investing in technology to improve routing and scheduling.

As a result, gross margin in the quarter was about 51.7%, down from 52% in the prior year's quarter. The margin numbers were a focus of a number of questions during the company's post-earnings call, with analysts questioning how long it would take for the company to show improvement.

Now what

In a statement accompanying earnings, CEO Gary W. Rollins expressed confidence that the increased spending now will pay off down the line, saying, "We continue to make investments in our company and are confident that these strategies and action plans will enable us to improve our margins and market share, and grow at a faster pace than our industry."

Even after the sell-off, the stock is not cheap, trading at more than 48 times trailing earnings. But the company is a strong operator in a sticky business where profitability tends to improve over time as teaser introductory rates roll off and pricing power kicks in. Despite its size, there are still ample opportunities domestically and abroad to consolidate the pest-control business, and the company said it would continue to evaluate potential targets.

Rollins is now down about 4% year to date, but the stock over the past five years has gained 165%, easily surpassing the S&P 500's 51% gain. After those gains and given Rollins' valuation, investors demand near perfection. It will be up to management to get margins trending in the right direction and deliver the results shareholders are clamoring for.