fixed a potential NPE