to fix a  bad array subscript