Make pagination buttons work by hand