Fixed a null issue