fix xml generator array out of buondry exception