Matchmaking with AI

Currently， we are doing 3v3v3, After a while of matchmaking, empty slots will be filled with AI. We encountered a problem where 4 teams of 2 players joins and they got matched together.What can I do here to solve this problem?