Make currentPageIndex public and implement setter.