Goby - Fix possible IndexArrayOutOfBounds exception