You get this because you are trying to reference an item in a collection that doesn't exist. So when you do
something[0]
you reference the first item in "something"
something[1]
this references the second item and so on. If, however, there is only 1 item in "something" then you'll get the index out of range error. We don't have access to your collections so this isn't something we can fix for you, you'll need to use the debugger to examine your collections and work out why the items you think are there actually aren't.