Fix bug causing array overrun. Only seemed to be showing a symptom