fixed extra access at end of array in normalization code