Fixed a null ref.