Fix paging bug and add download feature