pagination and fixes