Fixed null pointer for dead units and tie game issue