fix a possible NPE