fixed a NPE