Fix for pagination not working

This fixes the not working pagination when showing filtered and non filtered results.

![before](https://f.cloud.github.com/assets/2452341/1305576/9b2b5e48-319a-11e3-90a0-7c8853cd91d5.png)

![after](https://f.cloud.github.com/assets/2452341/1305578/a1ec9a58-319a-11e3-8265-e524648833ab.png)