Changed for loop to for each so that I could capture the document and then pass it in to be updated. And that worked...