resolved IndexOutOfException