Call to a member function pageNav() on null