Entrepreneurs are eternal optimists, but optimism alone can’t fuel a business. Often, when a business fails, owners are surprised, but usually there are many clues leading up to a business closing. And the situations leading to failure tend to repeat themselves among businesses. The Global Entrepreneurship Monitor found that lack of profitability is consistently the number one reason for business discontinuance around the world for 2017 and 2018.

Here are 5 signs your business is in danger of failure—and how to turn them around.

Warning sign #1: The thrill is gone.

It takes passion to run a business. If you find you’ve lost interest in your business or you actually dread doing your work, that’s not a good sign. You won’t have the staying power you need when times get tough if you’re not committed to seeing things through.

What to do about it: If you’re spending all day, every evening and most of the weekend working in your business—as many owners do—you’re bound to burn out and start questioning why you even got into it in the first place. That’s a recipe for closing up shop.

To turn things around, take a look at your calendar now and schedule some time for “refilling your cup” this week. If you’ve been neglecting working out, make some time to do something active. Haven’t spent much quality time with your family or friends? Plan that into your calendar, too. You’ll be surprised at how much enthusiasm you can get back if you give yourself time to recharge. And don’t just make time to take care of yourself this week. Make it a regular practice.

Warning sign #2: Business is very slow.

You can’t run a successful business if you’re not making sales. Whether you’re selling a service for which demand has dried up or you’ve introduced a new product that no one seems to want, that’s not a good sign for the future outlook of your business.

What to do about it: When sales are slow, it’s important to diagnose why that is. In some cases, it may be that you’re so busy running the business that you have no time to sell and need to add to your sales team. But if you’re selling the wrong product or services, hiring a new salesperson won’t help you. Can’t put your finger on the pulse of exactly what’s wrong? Ask a mentor or trusted business colleague to lunch and seek their advice. SCORE, which has a presence across the country, can match you with a seasoned business professional as a mentor if you don’t have one.

Warning sign #3: Your whole industry is collapsing.

Many industries are being disrupted by sweeping trends, such as new AI technology and global outsourcing. If your work can now be done by a software program or machine, the days when you can keep doing it are numbered. That’s a tough reality many business owners are facing today.

What to do about it: Don’t wait until the inevitable happens to make a change. Most of us have skills and ideas that can be deployed in more than one industry. If, for instance, you’re an attorney who prepares a lot of simple business documents, and you are finding that many of your clients are turning to online sites for those documents, it may be time to refocus your practice on services they do need. Not sure where to begin? Ask your existing clients about their pain points and look for ways you can solve them in a cost-effective manner.

Warning sign #4: You’re in legal trouble.

You’re facing a lawsuit that is going to cost thousands of dollars in legal fees. While big corporations have the deep pockets to recover from a disaster like this, small businesses usually don’t.

What to do about it: Know your objectives. While you may want to win a lawsuit, settling may cost you less in the long run, when you factor in legal fees. If you’re not sure you’re getting good legal advice, don’t be shy about talking to other attorneys for advice. With a great attorney on your side, you may be able to weather the storm.

Warning sign #5: You’re having a cash-flow crisis—again!

Growing your business can require a lot of cash but if you’re continually running short and in a perpetual scramble to pay your bills or make payroll, there’s something wrong. Running out of cash could kill your business if you are not careful.

What to do about it: Borrowing money is a short-term solution, but it’s not one you should be relying on habitually, given that you have to pay it back. Most likely, you need to take a hard look at your financial processes. Are you getting out your invoices on time? Are you collecting on late invoices after 30 days and following up if they aren’t paid? Are there recurring costs you’re incurring for services you no longer need that should be cancelled? These are some of the questions you should be asking yourself.

If you run a small business and are not staying on top of your finances, consider hiring a freelance bookkeeper. Having someone else get things in order will take a lot of pressure off of you, so you can concentrate on bigger-picture activities, like working on your strategy, winning new customers and growing your business.