the algorithm is s***

Hmm, must be on a different account.
w-w-w-b-b-w-w-b-b-w-w-b-w-w
There are times when you will see a bunch of whites or blacks in a row but it stays pretty well balanced.

It's possible to have strings of a color but it should be rare to get more than 4 in a row. When you're paired the player that gets black is the one most due that color based on recent games.
If you're aborting when you've had black, it highly likely you'll keep getting black unless your opponent is more out of balance. Over the long run, it should even out.