more fixing of potential NPE code...