Fixed pagination controls issues