moving array index from 1

Without this fix, if the searched word is on the last page of the document, there's an error. And it works only if all pages have almost the same coordinates.