Fixed page index bug