Fixed a div by 0 and a null-pointer in MCTS.