Editor: fix an array out of bounds exception.