fix a potential NPE