fixed socket.leave() bug