Fix bugs and implement fetch next page.