Added currentPageIndex as a property instead of private ivar