The Leadership Insider network is an online community where the most thoughtful and influential people in business contribute answers to timely questions about careers and leadership. Today’s answer to the question: What did you learn from your biggest failure? is written by Cheryl Black, CEO of YOU Technology.

After a dozen years in corporate America, I cofounded my first startup. I wrote the original business plan and financial model, and one of my partners recruited someone he knew for the CEO role. We moved to a house in San Francisco to operate the company. While we all paid rent, I was the only one putting in hard cash for business expenses prior to funding. I worked night and day on partnerships, engineering, professional services, and managing our clients. I am embarrassed to say that I had no idea who owned what percentage of the company — other than what I owned. I hadn’t seen the cap table. I went to board meetings — but only the open sessions. I wanted to build the company so badly, that I didn’t insist on any terms in exchange for the funding I was providing. I trusted my partners to do the right thing.

We eventually obtained funding from a top-notch VC and our staff grew to 55 people — all working in our house — before moving to a ‘real’ office and adding another 20 or so employees. We had vastly different styles and our CEO called the shots on how we spent our money. He hired a firm and spent a lot of money on rebranding and hired an expensive VP of Marketing. Although we had built an entire platform, revolutionized the telecom agency model, and had several paying clients, the market was tough in 2000 and 2001, so we eventually had to shut our doors, and sell the assets. Needless to say, I lost everything I invested. Stepping away from the whole experience I realized there were several lessons that I learned the hard way. The most important ones were:

See also: What to Do When You Make a Huge Mistake at Work

Chemistry matters
The only way to partner effectively is with the people who share the same ideals, goals, and styles. Don’t ever settle for working with someone you don’t know or don’t agree with on the basics. Just because they have experience, past success, look good on paper and can attract funding, does not mean you should trust them. If they hide things from you, run.

Check your gut
Alarm bells were going off for me from day one, but I had so much passion invested in building the company — forging partnerships and building a model that I instantly agreed to work with someone I didn’t know because I thought he could bring funding and get us off the ground. I loved the team I worked with, how hard we all worked, and how much we accomplished. I was so involved in the journey that I turned a blind eye to what my gut was screaming.

Don’t compromise
When it comes to foundational elements of a business — don’t compromise. Don’t be afraid to walk away or pass on what seems like a great opportunity if it doesn’t feel right — even if you are deeply emotionally invested. I certainly learned this from my expensive experience. Though it cost quite a bit more than my MBA, the lessons were more deeply felt and life altering. I have come to appreciate that I had the opportunity to make this mistake without losing more than some cash. Needless to say, it has absolutely shaped the way I approach business
to this day.