Fix pagination and add footer