Fixes pagination buttons.