Unconfirmed Class limit not clearing disconnected/spectators

Hello, first a huge thanks for making the class limits 99% working, it's been used the past few days and this time it works amazingly well.
Only there is this last issue where if a player join spectators or disconnect, his class slot will still be locked.

Le bug :
If a player disconnect or join spectator while holding a class slot, the slot will not be cleared.

How to reproduce :
Step 1 : Set class limits to 1 for each class
Step 2 : Join the game and spawn
Step 3 : Disconnect or select spectator

On another note, it's not worth a full thread : The /smod shuffle today has created a disbalance (6v4) it was the first time I seen this. And I can't reproduce it. Also there seem to be a rare case where the game show a disbalance (lets say 6v4 again) and the team with 4 can't be selected for joining. Again this one I couldn't reproduce it. If I manage to, I will make a thread for it.

Many thanks!