fix currentPage race