Pagination bugfix for frontend+bugfix

Used latest master.