Fix pagination and add app config