fix null pointer.