Corrected segfault from ignoring array subscripts