Sometimes stocks get punished for all the right short-term reasons but without deviating from a long-term plan that should lead to outstanding long-term returns. Sound confusing? Consider the curious case of Box (BOX 1.32%). The stock is down over 24% since Box reported earnings on February 27, nosediving after missing estimates and forecasting worse-than-expected guidance.

Fool contributor Billy Duberstein wrote of the report that Box's misfire amounted to committing "cardinal sins." You know what? He's absolutely right. Box's team blew it, from cofounders Aaron Levie (CEO) and Dylan Smith (CFO) right on down. Selling to government agencies and other regulated bodies always takes longer than expected. Now imagine trying to sell to U.S. regulators gearing up for or embroiled in a shutdown. So when management said the company was experiencing delays in closing deals with regulated agencies, they weren't really offering an explanation; they were stating the obvious. That Box didn't warn of potential trouble earlier is the real surprise to me.

Consider, too, the product Box is selling. The company is asking agencies tasked with protecting sensitive data to trust that Box will keep employees, citizens, partners, and more safe from prying eyes -- including those of its own employees. That's a big ask in an age of global cyber warfare.

We all should have seen this coming, especially Box management. The question now is how it proposes to respond and win over the skeptics. Fortunately, Levie and Smith have a plan that strikes me as both smart and achievable.

Check out the latest earnings call transcript for Box.

A screen shot of a blueprint where multiple users are entering comments in Box using Box Sidebar

Box Sidebar is one of the many ways the company is making it easier for workers to collaborate. Image source: Box.

What happened

Before digging into the plan, let's first cover what went wrong. According to Levie, Box had issues pulling some complex deals "across the finish line" in the quarter. Structural changes in the business to serve bigger clients with more complex needs hadn't yet taken root in some areas of Box, leaving the sales team less prepared and Box as a company unable to be "consistent across all of our go-to-market motions," Levie said.

The result? Current revenue grew faster than billings, suggesting that Box's backlog of business is shrinking faster than the company recognizes revenue from long-term contracts. Do that often enough and slowing growth will become no growth. Meanwhile, top-line revenue growth for the coming fiscal year is expected to slow to about 15%. When Levie says Box needs to be "consistent across all of our go-to-market motions," what you should hear is, "We need to close bigger deals faster and more consistently."

What's happening now

So that's the bad news. The good: All these problems are fixable, and Box already appears to be making significant strides. For example, the company recorded a 17.8% free cash flow margin, the fifth time in six quarters Box has reported positive free cash flow. And while gross margin declined in Q4, Box showed significant improvements in efforts to turn an operating profit and deliver positive earnings before interest taxes depreciation and amortization (EBITDA). It shouldn't be much more than a year before Box becomes consistently profitable, and sooner is a distinct possibility. How Box sells to its biggest prospects will make the difference.

Levie knows this; you can see it in his comments. My guess is he and his team are guiding for lower near-term revenue growth because they want the leeway to strike big deals with sprawling firms that need its services. It's the right move, in my opinion. Why? Complex, milestone-driven deals can fund decades of free cash flow when they're finally completed, but they almost always take months or years of cajoling and training, and (usually) the work of more than a few lawyers on the closing documents.

The Foolish bottom line

Box was always a different sort of company. Now it's transitioning again and investors don't like what they see. That's fine. Most great investing stories take time to unfold, and I've little doubt this one will have a happy ending. I'm glad to own shares of Box and plan to hang on as long as I can.