fix checking length of array