Fixed IndexOutOfBounds Error