array out of index fixed