The Entrepreneur Insiders network is an online community where the most thoughtful and influential people in America’s startup scene contribute answers to timely questions about entrepreneurship and careers. Today’s answer to the question “How do you avoid hiring the wrong people?” is written by David Glickman, CEO of Ultra Mobile and Primo Connect.

Over the course of my career, the biggest obstacle I’ve had—and one my peers have had—is hiring the wrong people. We all know that a bad hire can be costly to a company: missed business opportunities, strained relations at the office, and a potentially massive legal bill when you’re forced to let someone go. Add the complexity of a fast-growing startup, and there’s the risk that the role you hire for today may not be relevant tomorrow. How can you avoid bad hires while still growing a team that can adapt to the changing environment of your business?

The answer is surprisingly straightforward: Look for flexibility and versatility. If someone is flexible, I know he’ll be more able to adapt to the changing pace of the company, and will have a willingness to step up when new opportunities arise. When I hire someone who is versatile, I know he can expand his role as the company’s needs change. In both cases, you’re setting your team up for long-term viability.

To avoid tearing your hair out, here are three ways to avoid bad hires while growing your team in a changing environment:

Screen for long-term viability
My company is a big advocate of the screening process. This means taking the time to evaluate each candidate’s background, and identifying individuals who you can see have grown with opportunities instead of just following the traditional ladder. This will save you time, energy, and avoid the kind of interviewing fatigue that can lead to regretful mistakes—like that person you knew you shouldn’t have hired, but did anyway after realizing you didn’t have it in you for another round of interviews.

See also: 5 Ways to Avoid a Really Bad Hire

I then reserve the interview process to identify applicants who have demonstrated an ability to learn on the job and adapt quickly to changing circumstances. I find the key to a successful interview is to ask about prior leadership roles and the tactics they’ve used in organizing events, raising money, or growing a team. Self-direction is critical in a fast-growing company, especially since responsibilities can change radically from week to week and month to month.

I also try to quickly assess their pace, confidence, temperament, and determination by opening up a conversation about the company and seeing how the interviewee responds. If the person can’t keep up with the pace of the conversation, it may be an indication that he or she isn’t a good fit. Don’t hire someone simply because you need something done. Hire someone because he can be an effective player on your team.

Retain your go-getters
Just like in marketing, retaining a great employee is always preferable to recruiting a new one. However, as any experienced businessperson knows, the challenge is keeping the right people after you’ve hired them. Flexible, versatile people tend to get bored easily, so the key to keeping these people engaged is to involve them in the rollercoaster of a hyper-growth business.

 

One way I am able to sustain energy, even in between big projects, is exposing employees to the growth conversations that many companies keep locked up top. This transparency helps remind employees of the future potential, so you’ll keep them engaged and excited about what’s to come, and they’ll be more inclined to stay with you in the long run.

Don’t stop hiring
While the screening and interviewing process is the standard route to a great hire, you’ll sometimes be presented with opportunities outside of traditional hiring practices. When you come across a true superstar—someone your company can’t live without—it’s important to move quickly before the person moves on.

I once saw a presentation from a woman who was running a company that had just lost its funding. When I spoke with her afterward, it became immediately clear that she was exactly the sort of flexible, problem-solving person we were looking for, even if there wasn’t yet a place for her. I went back to my executive team and told them, “I just met somebody, and she’s one of us: confident and unflappable. We need to find something for her to run.” We did, and she’s been a valuable part of our team ever since.

In the world of hyper-growth startups, when opportunity knocks, you’ll want to make sure you’ve screened for experienced people who can help you open the door. Assuming you’ve done the work and asked the right questions, it’s unlikely that you’ll have to worry about a bad fit, a lazy employee, or a costly termination agreement. The only thing you’ll have to worry about is how to fit your rapidly growing company through the open door—and that’s a problem I’m happy to overcome.