fix Fatal error: Call to a member function getHLink() on a non-object  bug