Added kludge to avoid Array Out of Bounds