Fix array overrun