fixed array out of bound error message