fix the array length