Fixed a case wherein a hook's reference object is no longer valid