fix null ptr and update readme.