Fix infinite loop in updating leaderboard