Invalidate the ViewPager in onPageSelected.

Doing it in getItemPosition does not work properly.