fix when currentPage is major than pageCount, fix inserting a NaN in inputs