In a blog post way back in 2006, famed venture capitalist Paul Graham wrote that starting a startup isn’t about a “stick-to-your-vision” approach, but “more like science, where you need to follow the trail wherever it leads.”

We see the truth in Graham’s wisdom ubiquitously in companies brave enough to make pivotal changes, adopt a trial-and-error attitude to later reap big rewards. We’ve seen how much Facebook, Apple, and Google have changed their focus since launching. We’ve seen the transformation of PayPal from a cryptography company to the online payment service it is today. We’ve seen Netflix go from disrupting Blockbuster’s DVD rental business to being a force in television.

But for every successful bold change that worked, there are a boundless amount of those that didn’t work out as planned. Nonetheless, the “failures” moved the company forward and the founders live to tell the tales today. Below are moments that didn’t work as intended—and what it meant for the below companies:

Naama Bloom, founder and CEO of HelloFlo

In the beginning, HelloFlo was a small tampon subscription service for women and girls. Then in 2013, the company’s empowering and hilarious “Camp Gyno” ad led to a complete pivot in the company’s business focus. The ad, which currently has 11 million views on YouTube, became such a sensation, Bloom received a flood of emails with questions from everything about menstruation to menopause.

As a result, Bloom started developing more content and working with brands to create that content.

“While people wanted to buy products, what they really wanted was information,” she tells Fast Company. So while the company still offers care packages, it’s a one-time purchase and resources are dedicated to women’s health.”People don’t talk openly about [women’s health], but I had a different approach—and it resonated,” Bloom explains.

Blooms describes HelloFlo now as a women’s health company that devotes its content to everything from polycystic ovary syndrome (PCOS) syndrome to hormone replacement therapy to the vaginal discharge that all women have, but rarely discuss.

Ashwin Navin, CEO and founder of Samba TV

Since the company’s founding in 2008, Samba TV has changed its product focus, brand, and company name. At one time, the company was pursuing a product called Flingo, which allowed users to share what they were watching on their smartphones and other smart devices to their television screen with one click. This was prior to the days of AirPlay and Chromecast when this option wasn’t readily available.

The product and concept was cool enough, but inevitably, the team realized they weren’t gaining enough adoption and momentum. In the process, they also discovered that their software had a window into users’ preferences on content.

“We thought, instead of making the TV a consumption point for video, why don’t we make a discovery point for things you might be interested in, not only on your TV but on your second screen,” explains Navin.

The flip in direction happened in 2012, and by 2013 the company had changed its name to Samba TV. The move proved profitable: The company currently has over 100 full-time employees—up from 25 a year ago and revenue is up by 600%.

Michael Kim, CEO of Habit Design

When Kim’s behavior-change training solution startup was getting off the ground, the team was invited to Silicon Valley on the final round of selection to present for YCombinator investors.

“Only 8% get that far and YCombinator was the only investor we’d consider, so we were pretty excited,” says Kim.

The excitement didn’t last too long when the company started talking marketing strategy with YCombinator’s Paul Graham.

Kim explains: “Based on our customer traction and data, I felt that B2B2C was the best way to capture the most opportunity in the corporate productivity and wellness markets. [Graham] vehemently argued for B2C, although he didn’t have strong evidence for why our approach wouldn’t work. If we’d just agree to that pivot, we’d be shoe-ins was the implication.”

The team decided not to pivot and they didn’t get in.

“Many dark days followed, questioning our decision, revisiting our customer data,” says Kim. “Knowing when to stick to your strategy and when to pivot comes from good judgment. But, good judgment comes from experience, which comes from bad judgment. When is a decision one or the other? Usually, it won’t be revealed until much later.”

The company didn’t have to wait long to see its decision as the right one.

“Since then, we’ve seen others in our space try the B2C approach, raise money, yet fail,” says Kim. “We’ve since trained over 500 companies and 100,000 employees—including at Google, Apple, Starbucks, NASA, even the White House—without pivoting or dilutive financing.”

Nicole Sanchez, founder and CEO of Vixxenn

This past summer, Sanchez had worked with top stylists—everyone from those with the hottest salons in town to people who have a few thousand or million followers—to help sell retail products without having to carry inventory, a big challenge for small business owners.

The process of working with more top stylists became so labor intensive that Sanchez decided to team up with a potential partner that has massive distribution power. After several meetings, it was clear that if Vixxenn was going to continue with the business model as it stood, the deal needed to happen—and it needed to happen quickly.

When it was clear that it wasn’t going to, Sanchez was “crushed.”

“I came back, processed it, had some conversations with my investors, and came to the conclusion that the path forward with that particular model wasn’t going to happen,” she says.

The next step was letting people go, great people that Sanchez didn’t want to let go, but for the company to move on, it was desperately needed.

“If you’re in that position as a founder, it’s not easy, but if you’re going to survive you need to be transparent,” says Sanchez, who helped everyone she let go find new roles at other startups. “The reaction [from my team] was very supportive. I think my team trusted me and felt like I was going to take care of them and understood why we were doing what we were doing.”

Vixxenn has gone on to change direction, becoming a company solely focused on helping small business owners repair their credit, which Sanchez explains was the huge problem she kept running into when helping small business owners with their inventory. Today, the company is called eCreditHero and has a rapidly growing online community.

Taylor Erkkinen and Harry Rosenblum, cofounders of The Brooklyn Kitchen

When Erkkinen and Rosenblum were approached to open a store in Manhattan, it seemed too good to be true.

Photo: Michael Loccisano/Getty Images for City Harvest

“Our growth until then had been steady, and impressive even to ourselves, so we went for it,” says Erkkinen. “We moved a brand that had been distinctly built on serving our own neighborhood in Brooklyn to a different borough, and despite our high hopes, it never really translated. The new space didn’t reflect the core reason that people were coming to our original location, and ultimately it didn’t stick.”

It quickly became clear that the Brooklyn-based store wasn’t going to work in Manhattan, and after a year, the cofounders decided to back out of the project. Erkkinen describes it as one of the hardest things she’s ever had to do. “We would have been sunk if we had waited any longer,” she says.

She explains: “We battened down in Brooklyn, and we realized that serving our community and our people was where we needed to be. Our then smaller education program pivoted into a full-blown culinary program, and we’re now working tirelessly to bring this same culinary curiosity to all areas of the store.”

John Meadow, founder and president of LDV Hospitality

In 2008, when a then 20-something Meadow started his restaurant group, he wanted to take on everything that came his way—and working with celebrity chefs was one of those opportunities. After working with five, Meadow realized he knew nothing about being an agent for celebrity chefs.

“There’s a whole lot of very talented, aggressive people who are in the business of doing deals for others,” says Meadow. “I’m just a restauranteur.”

After a few missteps and a very public lawsuit later, Meadow realized creating and running great restaurants were what he wanted.

“When you sign up for an overly cumbersome relationship that you really don’t need and it doesn’t serve you . . . nothing comes for free,” says Meadow. “If it represents distraction, why bother? I was so young, dumb, and cocky when I was starting out that I thought I could do everything. It’s just not who I am.”

He adds: “When I cut out that greed and that noise and that reckless ambition that says I can do everything and say, ‘you know what, let me go and focus’ . . . I’m probably more ambitious now, I’m doing more now, employing more people, significantly higher growth, yet doing more of a consistency, which is opening restaurants.”

Brian Leventhal, founder of Brooklyn Winery

When the idea for Brooklyn Winery was born, it was initially conceptualized as a wine bar with a totally unique make-your-own wine component to the business. The idea was to create an environment that not only served great wine, but allowed guests to intimately partake in the process it took to get to that final pour. In theory, it was exciting and well received, but in practice it was quite the opposite.

“Selling wine is easy—selling wine futures that require a minimum investment of about 300 cases, about 3,600 bottles, proved nearly impossible,” says Leventhal. “We didn’t have a name or established reputation behind us, and we realized relatively quickly that we wouldn’t be able to survive on the minimal revenue stream we were seeing from the private client wine-making. We needed to pivot and figure out a way to support the wine-making business at a time when we weren’t even able to serve our own wine in the bar. We had to wait out the aging process.”

The solution came in the form of a couple, who walked in one day and asked if they could rent the 25-foot glass Atrium space for their wedding.

“That was a key moment for us. We didn’t build the space to host events but quickly realized that it was ideally suited for everything from weddings to corporate meetings and receptions,” explains Leventhal. “We slowly started to build our events team, brought catering in-house, and used our sales team to drive awareness in the events industry.”

Six years later, Brooklyn Winery is thriving, hosting over 300 events annually.

“It’s easy to say that none of this matters because in the end we were able to build a successful business, but that first 18 months was a true test of nerve and determination,” says Leventhal. “Luckily, we learned, and continue to learn, that taking risks and diving into the unknown is usually worth it.”