Adding getPageIndex to make UIAPageIndicator work