fix null pointer