Important check on array index