Fixed a null object reference.