avoid NPE
fixed NPE