fix a null pointer