fix potential nullpointer