Fix nullpointer oversight