fixed bug in array of array counting.