fixed NPE
fixed NPE