This sounds to me like an "off by one" error. If you are keeping the same iterator or row numbers without taking into account that you have added, removed, or rearranged rows, then your iterator or index becomes invalid once you have altered the first position.
Sorry, I don't have time today to look at your complete code. I've been burned by this same kind of problem, so it seems a logical place for you to start looking.
Bookmarks