I have been searching for the answer to this problem for about 14 hours now. I mean non stop if I was not troubleshooting, testing, backing up, changing my loop, I was on Google and looking through here. I must say I am so happy that I finally found this wonderful post.
I had this same issue and I had my code very similar so it worked out. Thanks guys.