- fixed NPE bug