fix bug of array-ref