When you hear the stories behind some of today’s most successful companies, it can be easy to forget just how hard it is to set up and scale a business.

Sure, the myth that as many as 80% of new companies fail in their first 18 months has been well and truly debunked. But it’s fair to say it’s still pretty tough to get a new business going, and budding entrepreneurs can be sure to face many hurdles along the way.

What separates the success stories from the failures is a person’s ability to learn from their mistakes and bounce back. We spoke with three successful entrepreneurs from the Forum’s Young Global Leaders community to find out how they did that.

Rossanna Figuera, Co-Founder and Ambassador of Good Things, Wafels & Dinges

During the early years of my company, I enjoyed being a “collaborative leader” who considered everyone’s inputs on several areas of decision-making. I believed that feeling involved helped kept employee engagement high.

And then one day, one of our trusted team members went against company security protocols and destroyed a key piece of equipment that cost the company thousands of dollars in lost revenue while jeopardizing several jobs. I was under severe stress, and made the absurd decision to use this time to give the whole team a lesson. I called a staff meeting and asked everyone to vote on the future of the reckless team member: should he be fired, or should everyone forfeit their sales bonuses for the next three months instead?

Having the future of one of their teammates in their hands was too much for my young, inexperienced staff to handle. For a long time afterwards, employee morale was at its lowest, we lost a couple of valuable employees, and it took serious effort to rebuild people’s trust back up.

I carried a feeling of failure for a long time. I also learned a valuable lesson: leadership involves making the tough decisions that sometimes only you can make. Knowing when that time has come is essential. Anything else is irresponsible.

Rajeeb Dey, CEO and Founder, Enternships

Failure for me is as much a state of mind as it is a definitive outcome. It’s in part driven by your objective. Is it a purely financial one – to IPO and become a “unicorn” business, for example – or is it to create social impact and a movement?

Entrepreneurs are by nature wildly ambitious; when I started my venture Enternships while still a student at Oxford University, I was driven by the frustration that there was no exposure to anything other than the “blue chip” corporations that came on campus for graduate recruitment fairs.

Students were oblivious to the fact that there were over 4 million start-ups and small businesses, and that you could even make a job – by becoming an entrepreneur – rather than taking a job.

My vision was therefore to change attitudes and raise awareness, and in doing so create a new word – “enternship”, an entrepreneurial internship. I had big hopes of it ending up as a recognized word, listed in dictionaries.

Did I succeed with that goal? No. You could therefore consider that a failure. But we still helped over 7,000 start-ups and small businesses connect to talent, and helped thousands of young people find jobs and create their own. While not quite what I’d originally hoped for, I think it’s something we can be proud of.

My main lesson is that everything happens for a reason, and as long as you work your hardest and have the best intentions (and rarely is this driven by making the most money) the results will follow. It’s never an easy road, and it’ll be full of trials and tribulations, but the satisfaction of bringing your vision to reality is priceless, so enjoy the ride!

Shivani Siroya, CEO and Founder, Tala

Years ago, our company’s first alternative credit scoring product was an SMS-based accounting and reporting tool. We would spend weeks at a time in our markets in sub-Saharan Africa and South-East Asia training small business owners on how to use the tool and relying on their self-reported data over several months to build our credit scores. After one of these training sessions, in Kenya, a man named William seemed disappointed. He told us that the tool seemed great and all, but wanted to know: “Do you have an app for that?” He reached into his pocket and proudly retrieved his new Android smartphone.

We realized, in that moment, that we had completely misjudged our customer base and overlooked the rapid uptake of smartphones in our target markets. Shortly thereafter, we piloted an Android app that frictionlessly collected data from our customers’ smartphones rather than requiring them to self-report. We could now build credit scores in minutes – no training required.

Today, this is the product we’re deploying to open up financial services around the world. I can’t say it wouldn’t have happened without William, but I do know that we learned a valuable lesson about listening to our customers, checking our own biases, and designing from the person up.