Fix a bug of hosting a game

If you exit host mode, it won't keep open in the background.