fixed NPE case