fixed a possible NPE