BUG: Make pagination work when there are many results