Fix currentPage reset bug