Just keep your head down working, and it smooths out over time. You'll always be owed money, but the double and triple payments you receive one month makes up for the payments you don't receive in the current month.
Concentrate on just getting the work done, and the cash flow will tend to work itself out.
It can be disheartening, I know from experience, when you're skint and have been working hard, and it kinda saps your motivation to do more, but really, it's head down time and just keep plugging away getting those accounts cleaned and your cash flow will sort itself out.