correct pagination and adapt devices