fixed bugs with player leaving.