Fix weird array bounding issue