He was able to do that because the other sleeping pokemon had fainted by then, there is no bug here.the sleep clause mod was activated (only one pokemon can be put to sleep) and the opponent used yawn 3 or 4 times, and i got put to sleep all of them. link to the battle: http://replay.pokemonshowdown.com/ou-163329442