Fixed a null ref