Fixed a null pointer