Fixed the bug with player leave event.