Fix nullref found in logs