Fix another array out of bounds error