Pagination fix for page >= 10

Could do with being fixed properly (i.e. better regex) but this still works