Fixed clicking on pagination buttons