bug fix null pointer