Pagination bugfix for frontend+backend