Making pagination really dynamic.

The pages 1-10 is always static. This fixes this.