Fixed a bug in CTF team management

Fixed a bug in CTF team management that caused the teams to be balanced
wrong.
Added leave handling in game initializing state

Added leave handling in game initializing state.