Carrols Restaurant Group (NASDAQ:TAST) , a large franchisee of Restaurant Brands International's (NYSE:QSR) Burger King and Popeyes, reported earnings on Nov. 7, and Wall Street didn't like it. Carrols shares sold off more than 10% due to a net loss of $0.09 per share. This loss was a major disappointment since quarterly revenue was up more than 34% year over year (mostly due to a merger) and comparable-restaurant sales were up a healthy 4.5%.

It should have been much better for Carrols, but the company made a mistake -- one that accidentally discounted $8.3 million in food -- overshadowing an otherwise stellar comps gain and erasing all profits for the quarter.

Whoops!

Fielding questions in the third-quarter earnings call, Carrols CEO Dan Accordino explained that the company ran limited-time Whopper Meal Deals. Diners could opt for a $4 Whopper Jr., a $5 Whopper, or a $6 Double Whopper deal. Each meal would come with a value fry and value drink. The intention was that customers would be attracted to the value pricing at first, but then would be up-sold to larger drinks and fries.

At least that's how it was supposed to work. What actually happened was that the system charged customers incorrectly, in many cases crediting additional discounts to the Whopper meals. People were probably unaware that they got extra discounts, as Accordino said that their analysis showed the company didn't even get the benefit of increased restaurant traffic from the promotional pricing.

It ultimately was an $8.3 million mistake. Comps growth of 4.5% reflects this software error. Had there not been double discounts, comps would have grown 7.4% -- almost unheard-of growth in the restaurant industry these days.

Finding the problem

More interesting than the headline for investors is how Carrols uncovered the double-discount problem. Franchiser company Burger King outperformed Carrols for the quarter, reporting a 5% comps increase in its third quarter. Accordino said, "We typically outperformed the Burger King system, which is why our underperformance raised a red flag when we received the comparative information for review."

Although Carrols is a small player relative to Burger King overall, it is the largest global Burger King franchisee, and it expects to be better. Underperforming was a reason for the investigation. The problem was found and fixed toward the end of August. Comps for September were up 7.9% and have continued to be strong.

We should note that underperforming Restaurant Brands International right now is nothing to be ashamed of. Burger King is coming off its best quarter in five years, driven by success in new value-menu pricing and new menu items like the meatless Impossible Whopper. And Popeyes, another RBI chain, is coming off a quarter of 10% comps growth, driven by the surprise success of its chicken sandwich.

But Carrols doesn't want to just be good, it wants to outperform -- even when compared with Burger King's record quarter. And if not for one ($8.3 million) glitch, it would have.

Moving forward

Over the next few years, Carrols has some important growth drivers. In February 2019, it announced it was acquiring Cambridge Franchise Holdings, a fellow Burger King franchisee, for $238 million. This gave Carrols over 200 additional locations. And the deal included a new agreement with Burger King, under which Carrols will open 200 new locations over the next six years, and has the option to acquire up to 500 existing locations as it sees fit. Carrols' previous agreement was capped at 1,000 locations, a number it was approaching pre-merger.

Cambridge had about $100 million in debt at the time of acquisition. Carrols moved quickly to refinance this debt under more favorable terms, although refinancing charges resulted in a net loss for the company in its second quarter. Additionally, Cambridge locations don't perform as well as Carrols' locations, something the company is working to fix by improving customer satisfaction and reducing food waste, among other things. These fixes were to be completed by mid-November, so it should be reflected in the company's fourth-quarter 2019.

Given that Carrols has the opportunity to grow its footprint by 70%, is growing comps, and is fixing underperforming locations, it's worth watching in the coming quarters. Hopefully, all multimillion-dollar glitches are now in the past.

This article originally appeared in the Motley Fool.

Jon Quast has no position in any of the stocks mentioned. The Motley Fool has the following options: short January 2020 $94 calls on Restaurant Brands International. The Motley Fool has a disclosure policy.