Fix page counting expresion
HACK: Force maxPageIndex