Fixed pagination buttons bugs