fix bug where pagination buttons weren't being disabled