Fix possible NPE
Better fix