Fix NPE in scoreboard

Other fixes