Fixed auto pagination

For me the auto pagination did not work. In the changes API I had 10 pages and the loop got stuck at page 2 which got called infinitely.