in reply to a really odd thing ..
the array on the right is full of data
And you are sure that it is full enough so that $x is not out-of-bounds?