removed links from '...' and also added a condition that verifies if page number is really a number