bug fix of array.add