init scoreboard
fix some bugs