Growth requires a lot of cash outlay, so it’s not surprising that businesses run into cash flow problems. This is especially problematic for small companies eager to make that first big score with a sale to a large firm which may routinely take as long as 120 days (or more) to pay an invoice. Good luck finding employees (even free lancers) willing to work a month or more without pay. (Don’t get me wrong, they’re out there, but they tend to be the kind of people who are secretly and actively plotting to kill you in your sleep.) I am always amazed by people who tell me that they quit with the owner owing them a month’s pay. Personally if my direct deposit is 15 minutes late I’m loading office equipment into my car and mentally calculating how hard it would be to harvest the owners organs to sell on the black market (it turns out it’s really hard, by the way). Fortunately there are ways to avoid this pitfall, ones that don’t involve not paying your workers or creditors:

1. Establish a good relationship with your bank.

The time to establish a larger line of credit is before you get in trouble, not once you realize that you can’t make payroll.

Related: How to Pick the Right Bank for Your Business

2. Shorten the length of your payment terms.

Also, where appropriate, you can ask for at least a partial payment up front. The worst a potential customer can do is say “no,” and if you explain your situation many will understand. In fact, I routinely put in outrageously favorable terms into my quotes just so that the purchaser can take them out. It accomplishes two things: 1.) it takes the focus off the price, which I make a practice not to inflate, and 2.) it makes the purchaser feel as if they have scored a victory -- even though it was a battle I never intended to fight.

3. Talk to your customer.

When you talk to your customer -- not the purchaser -- but the individual who placed the order, you can explain the realities of your firm's cash flow. You can show him that you can’t afford to go months without payment.

Related: 10 Cash-Flow Surprises That Could Kill Your Startup

When I was head of organizational development for a global auto supplier, I would routinely source work to training providers, printers, graphic artists, and other small businesses for which a $15,000 job was a very big deal, but company-wide it wasn’t uncommon for other departments to source $1 million or more. Because I understood my vendors’ situations I was able to talk to the purchasing agent to get more favorable terms and to expedite payment. I was able to do that because I talked to the purchaser before a purchase order (PO) was issued. Apparently it takes a papal bull to get payment terms changed after the PO has issued and approved. I never understood why, but passed it off as just a purchaser being lazy. I’m sure that’s not the real reason but I sleep better thinking that things I don’t understand are because others are either lazy or intellectually my inferior.

4. Understand the customer’s accounts payable system.

In many firms invoices are processed twice a month (usually on the first and the fifteenth) -- what accounts payable does the remainder of the time is another one of those imponderables where looking for answers likely comes to no good end. What this means is that if you’re invoice hits accounts payable the day after posting then an additional 14 days is added to when you can expect to get paid. The clock starts clicking on payment terms once the accounts payable clerk puts your invoice into the system, and plenty has to happen before that.

Related: Entrepreneurs: Here's How To Make Sure You Get Paid

Typically, your invoice will not be processed until it is approved by the person who ordered it, so if you sent it directly to accounts payable the first thing they will do with it is send it to the person who ordered it for approval. This can take weeks, particularly if that person travels, is inattentive their email or interoffice mail, or has just put your invoice at the top of his or her pay-no-mind list. Once approved it gets sent back to accounts payable where it is entered into the system. In other words, net 90 days could mean that you don’t get your invoice paid for six months or more.

5. Work their process with them.

The best way around this is to send your invoice to your contact electronically and specifically ask them to please approve it and forward it to accounts payable. I have also found that hand delivering a hard copy (and would it kill you to buy lunch while you're at it?) allows you to discuss the project and get feedback from your customer. That can also start a new conversation that leads to additional sales.