Changed pagination shown numbers based on size.