I got it, the document changes and the positions too. Use the reverse and forEach then.