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

Thank you for the hint :+1: