List.ReplaceItemAtIndex (sometimes index input is an Empty List)

I think this is a better solution. I just found it on the forum while looking for something else.
I will try it out later and get back to this post but for now I would say try this instead.