Fixed potential NPEs after calling getPagerAdapter()