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

This was working but you are right. I've fixed. I'm committing right now.