prevent overflow of array